Add --export-level, --export-format to manual
[quvi-tool.git] / autogen.sh
blob0558c2d535014e1a425b3917fd64658e467fb0c0
1 #!/bin/sh
2 # autogen.sh for quvi.
4 source=.gitignore
5 cachedir=autom4te.cache
7 gen_cmdline()
9 echo "Generate cmdline..."
10 gengetopt < src/quvi/cmdline.ggo \
11 -C --unamed-opts=URL --output-dir src/quvi --no-version
14 gen_manual()
16 echo "Generate manual..."
17 MAN=doc/man1/quvi.1 ; POD=$MAN.pod ; VN=`./gen-ver.sh`
18 pod2man -c "quvi manual" -n quvi -s 1 -r "$VN" "$POD" "$MAN"
19 return $?
22 cleanup()
24 echo "WARNING!
25 Removes _files_ listed in $source and $cachedir directory.
26 Last chance to bail out (^C) before we continue."
27 read n1
28 [ -f Makefile ] && make distclean
29 for file in `cat $source`; do # Remove files only.
30 [ -e "$file" ] && [ -f "$file" ] && rm -f "$file"
31 done
32 [ -e "$cachedir" ] && rm -rf "$cachedir"
33 rmdir -p config.aux 2>/dev/null
34 exit 0
37 help()
39 echo "Usage: $0 [-c|-h]
40 -h Show this help and exit
41 -c Make the source tree 'maintainer clean'
42 Run without options to (re)generate the configuration files."
43 exit 0
46 while [ $# -gt 0 ]
48 case "$1" in
49 -c) cleanup;;
50 -h) help;;
51 *) break;;
52 esac
53 shift
54 done
56 echo "Generate configuration files..."
57 autoreconf -if && gen_cmdline && gen_manual &&
58 echo "You can now run 'configure'"