readme: remove ancient build notes
[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 if which libtoolize > /dev/null 2>&1; then
21     libtoolize -c -f
22 elif which glibtoolize > /dev/null 2>&1; then
23     glibtoolize -c -f
24 else
25   echo "No libtoolize found on your system (looked for libtoolize & glibtoolize)"
26   exit 1
27 fi
28
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
37 fi
38
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
48
49 echo "Deleting autom4te.cache directory"
50 rm -rf autom4te.cache
51
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)
61     fi
62 fi