summaryrefslogtreecommitdiffstats
path: root/bootstrap
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap22
1 files changed, 15 insertions, 7 deletions
diff --git a/bootstrap b/bootstrap
index 2672595433..b0af7ca9ec 100755
--- a/bootstrap
+++ b/bootstrap
@@ -13,6 +13,8 @@
# source tree
progname=`basename $0`
+top_srcdir=`dirname $0`
+
verbose="";
quiet="false"
mode="generate"
@@ -31,9 +33,9 @@ usage()
exit 1;
}
-if test ! -f VERSION; then
+if test ! -f $top_srcdir/VERSION; then
echo "${progname}:"
- echo " Please change directory to RTEMS's toplevel directory"
+ echo " Installation problem: Can't find file VERSION"
exit 1;
fi
@@ -57,25 +59,31 @@ case $1 in
esac
done
-pwd=`pwd`;
-
case $mode in
generate)
- confs=`find $pwd -name 'configure.in' -print`
- aclocal_dir=$pwd/aclocal
+
+ case $top_srcdir in
+ /* ) aclocal_dir=$top_srcdir/aclocal
+ ;;
+ *) aclocal_dir=`pwd`/$top_srcdir/aclocal
+ ;;
+ esac
+
+ confs=`find . -name 'configure.in' -print`
for i in $confs; do
dir=`dirname $i`;
( test "$quiet" = "true" || echo "$dir";
cd $dir;
aclocal -I $aclocal_dir;
autoconf;
- test -f Makefile.am && automake $verbose ;
test -n "`grep CONFIG_HEADER configure.in`" && autoheader ;
+ test -f Makefile.am && automake $verbose ;
test -f Makefile.am && test -n "`grep 'stamp-h\.in' Makefile.in`" \
&& echo timestamp > stamp-h.in
)
done
;;
+
clean)
test "$quiet" = "true" || echo "removing automake generated Makefile.in files"
files=`find . -name 'Makefile.am' -print | sed -e 's%\.am%\.in%g'` ;