X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=sidebyside;f=autogen.sh;h=013a26545201e97f76e9bf52324916211836cf08;hb=0176629ab3f71e88850ab95796b0e519c4d0f740;hp=fd09398694568a1bf3c2f8b48c99b748849f3030;hpb=caa55aec4ae0421db69a0b9feac5cf0880f1c098;p=fs%2Flustre-release.git diff --git a/autogen.sh b/autogen.sh old mode 100644 new mode 100755 index fd09398..013a265 --- a/autogen.sh +++ b/autogen.sh @@ -1,62 +1,26 @@ -#!/bin/sh +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0 -# 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 -} - -# install Lustre Git commit hooks by default - LU-2083 -for HOOK in commit-msg prepare-commit-msg; do - if [ -d .git/hooks -a ! -e .git/hooks/$HOOK ]; then - ln -sf ../../build/$HOOK .git/hooks/ - fi -done - -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." +# This file is part of Lustre, http://www.lustre.org/ +# +# autogen.sh +# +# Run various autotools, thereby creating the configure +# script and top-level make files +# - ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I $PWD/$dir/autoconf" +set -e +pw="$PWD" +for dir in libcfs lnet lustre ; do + ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I $pw/$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 +# avoid the "modules.order: No such file or directory" failure +touch modules.order -# 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 +libtoolize -q +aclocal -I $pw/config $ACLOCAL_FLAGS +autoheader +automake -a -c +autoconf