3 # NOTE: Please avoid bashisms (bash specific syntax) in this script
5 # die a horrible death. All output goes to stderr.
9 echo "bootstrap failure: $*"
17 eval "$@" || die "command exited with code $?"
21 # install Lustre Git commit hooks by default - LU-2083
22 for HOOK in commit-msg prepare-commit-msg; do
23 if [ -d .git/hooks -a ! -e .git/hooks/$HOOK ]; then
24 ln -sf ../../build/$HOOK .git/hooks/
28 echo "Checking for a complete tree..."
29 REQUIRED_DIRS="libcfs lnet lustre"
30 OPTIONAL_DIRS="snmp portals"
31 CONFIGURE_DIRS="libsysio lustre-iokit ldiskfs"
33 for dir in $REQUIRED_DIRS ; do
35 die "Your tree seems to be missing $dir.
36 Please read README.lustrecvs for details."
38 ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I $PWD/$dir/autoconf"
40 # optional directories for Lustre
41 for dir in $OPTIONAL_DIRS; do
42 if [ -d "$dir" ] ; then
43 ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I $PWD/$dir/autoconf"
49 run_cmd "aclocal -I $PWD/config $ACLOCAL_FLAGS"
51 run_cmd "automake -a -c"
54 # bootstrap in these directories
55 for dir in $CONFIGURE_DIRS; do
58 echo "bootstrapping in $dir..."
59 run_cmd "sh autogen.sh"