Merge 1.8.0~pre4 packaging into master
[pkg-k5-afs_openafs.git] / regen.sh
blob3ada36c6b88afb6afa3b6c03d615d84938929074
1 #!/bin/sh -e
3 while getopts "q" flag
4 do
5 case "$flag" in
6 q)
7 skipman=1;
8 ;;
9 *)
10 echo "Usage ./regen.sh [-q]"
11 echo " -q skips man page generation"
12 exit
14 esac
15 done
17 echo "Updating configuration..."
19 echo "Running libtoolize"
20 if which libtoolize > /dev/null 2>&1; then
21 libtoolize -c -f -i
22 elif which glibtoolize > /dev/null 2>&1; then
23 glibtoolize -c -f -i
24 else
25 echo "No libtoolize found on your system (looked for libtoolize & glibtoolize)"
26 exit 1
29 echo "Running aclocal"
30 if which aclocal > /dev/null 2>&1; then
31 aclocal -I src/cf -I src/external/rra-c-util/m4
32 elif which aclocal-1.10 > /dev/null 2>&1; then
33 aclocal-1.10 -I src/cf -I src/external/rra-c-util/m4
34 else
35 echo "No aclocal found on your system (looked for aclocal & aclocal-1.10)"
36 exit 1
39 echo "Running autoconf"
40 autoconf
41 echo "Running autoconf for configure-libafs"
42 autoconf configure-libafs.ac > configure-libafs
43 chmod +x configure-libafs
44 echo "Running autoheader"
45 autoheader
46 #echo "Running automake"
47 #automake
49 echo "Deleting autom4te.cache directory"
50 rm -rf autom4te.cache
52 if [ $skipman ] ; then
53 echo "Skipping man page build"
54 else
55 # Rebuild the man pages, to not require those building from source to have
56 # pod2man available.
57 if test -d doc/man-pages ; then
58 echo "Building man pages"
59 perl doc/man-pages/merge-pod doc/man-pages/pod*/*.in
60 (cd doc/man-pages && ./generate-man)