X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=autogen.sh;h=00f5c4b407ae9f9be468e931252187a02f6472a3;hp=3920385ab2dafffec2f650547f1c43e4a2ffb9b6;hb=345683b05ad07e537fed1c65a04296c767558d0d;hpb=f64af1d45df2a76f97337b47259363f61fab6b5f diff --git a/autogen.sh b/autogen.sh index 3920385..00f5c4b 100644 --- a/autogen.sh +++ b/autogen.sh @@ -1,2 +1,55 @@ #!/bin/sh -exec sh build/autogen.sh $@ + +# NOTE: Please avoid bashisms (bash specific syntax) in this script + +# die a horrible death. All output goes to stderr. +# +die() +{ + echo "bootstrap failure: $*" + echo Aborting + exit 1 +} 1>&2 + +run_cmd() +{ + echo -n "Running $*" + eval "$@" || die "command exited with code $?" + echo +} + +echo "Checking for a complete tree..." +REQUIRED_DIRS="libcfs lnet lustre" +OPTIONAL_DIRS="snmp portals" +CONFIGURE_DIRS="libsysio lustre-iokit ldiskfs" + +for dir in $REQUIRED_DIRS ; do + test -d "$dir" || \ + die "Your tree seems to be missing $dir. +Please read README.lustrecvs for details." + + ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I $PWD/$dir/autoconf" +done +# optional directories for Lustre +for dir in $OPTIONAL_DIRS; do + if [ -d "$dir" ] ; then + ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I $PWD/$dir/autoconf" + fi +done + +PWD_SAVE=$PWD + +run_cmd "aclocal -I $PWD/config $ACLOCAL_FLAGS" +run_cmd "autoheader" +run_cmd "automake -a -c" +run_cmd autoconf + +# bootstrap in these directories +for dir in $CONFIGURE_DIRS; do + if [ -d $dir ] ; then + cd $dir + echo "bootstrapping in $dir..." + run_cmd "sh autogen.sh" + fi + cd $PWD_SAVE +done