tests depends on viced
[openafs.git] / regen.sh
1 #!/bin/sh -e
2
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
13             ;;
14     esac
15 done
16
17 echo "Updating configuration..."
18
19 echo "Running libtoolize"
20 libtoolize -c -f
21
22 echo "Running aclocal"
23 if which aclocal > /dev/null 2>&1; then
24   aclocal -I src/cf -I src/external/rra-c-util/m4
25 elif which aclocal-1.10 > /dev/null 2>&1; then
26   aclocal-1.10 -I src/cf -I src/external/rra-c-util/m4
27 else
28   echo "No aclocal found on your system (looked for aclocal & aclocal-1.10)"
29   exit 1
30 fi
31
32 echo "Running autoconf"
33 autoconf
34 echo "Running autoconf for configure-libafs"
35 autoconf configure-libafs.ac > configure-libafs
36 chmod +x configure-libafs
37 echo "Running autoheader"
38 autoheader
39 #echo "Running automake"
40 #automake
41
42 echo "Deleting autom4te.cache directory"
43 rm -rf autom4te.cache
44
45 if [ $skipman ] ; then
46     echo "Skipping man page build"
47 else 
48     # Rebuild the man pages, to not require those building from source to have
49     # pod2man available.
50     if test -d doc/man-pages ; then
51         echo "Building man pages"
52         perl doc/man-pages/merge-pod doc/man-pages/pod*/*.in
53         (cd doc/man-pages && ./generate-man)
54     fi
55 fi