X-Git-Url: https://git.openafs.org/?p=openafs.git;a=blobdiff_plain;f=regen.sh;h=28fecd76e93ff262f40b7310826ce7e9a26f644f;hp=bc059256c393ae57cb3c5418e970f370047310d6;hb=ac05e8ceebd05c2d8496759e70cf7b1b92541134;hpb=0b21e24d0a96401033d55d3c079c954138b7c50e diff --git a/regen.sh b/regen.sh index bc05925..28fecd7 100755 --- a/regen.sh +++ b/regen.sh @@ -1,19 +1,62 @@ +#!/bin/sh -e + +while getopts "q" flag +do + case "$flag" in + q) + skipman=1; + ;; + *) + echo "Usage ./regen.sh [-q]" + echo " -q skips man page generation" + exit + ;; + esac +done + echo "Updating configuration..." + +echo "Running libtoolize" +if which libtoolize > /dev/null 2>&1; then + libtoolize -c -f +elif which glibtoolize > /dev/null 2>&1; then + glibtoolize -c -f +else + echo "No libtoolize found on your system (looked for libtoolize & glibtoolize)" + exit 1 +fi + echo "Running aclocal" -aclocal -I src/cf +if which aclocal > /dev/null 2>&1; then + aclocal -I src/cf -I src/external/rra-c-util/m4 +elif which aclocal-1.10 > /dev/null 2>&1; then + aclocal-1.10 -I src/cf -I src/external/rra-c-util/m4 +else + echo "No aclocal found on your system (looked for aclocal & aclocal-1.10)" + exit 1 +fi + echo "Running autoconf" autoconf echo "Running autoconf for configure-libafs" -autoconf configure-libafs.in > configure-libafs +autoconf configure-libafs.ac > configure-libafs chmod +x configure-libafs echo "Running autoheader" autoheader #echo "Running automake" #automake -# Rebuild the man pages, to not require those building from source to have -# pod2man available. -echo "Building man pages" -if test -d doc/man-pages ; then - (cd doc/man-pages && ./generate-man) +echo "Deleting autom4te.cache directory" +rm -rf autom4te.cache + +if [ $skipman ] ; then + echo "Skipping man page build" +else + # Rebuild the man pages, to not require those building from source to have + # pod2man available. + if test -d doc/man-pages ; then + echo "Building man pages" + perl doc/man-pages/merge-pod doc/man-pages/pod*/*.in + (cd doc/man-pages && ./generate-man) + fi fi