summaryrefslogtreecommitdiffstats
path: root/bootstrap
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2002-10-30 07:08:44 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2002-10-30 07:08:44 +0000
commit282cb9c3addbafe4db4653693016ae4d90e077f4 (patch)
tree3dd39c7c051159c09082c8870a4dc5d16de997e5 /bootstrap
parent2002-10-29 Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff)
downloadrtems-282cb9c3addbafe4db4653693016ae4d90e077f4.tar.bz2
2002-10-30 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* bootstrap: Add generate_bspdir_acinclude to automatically update c/src/lib/libbsp/<cpu>/acinclude.m4. Use #! /bin/sh instead of #!/bin/sh. Remove autom4te*.cache during ./bootstrap --clean.
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap36
1 files changed, 35 insertions, 1 deletions
diff --git a/bootstrap b/bootstrap
index f0d34a3240..92b922492e 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,4 +1,4 @@
-#!/bin/sh
+#! /bin/sh
#
# helps bootstrapping, when checked out from CVS
# requires GNU autoconf and GNU automake
@@ -36,6 +36,37 @@ usage()
exit 1;
}
+generate_bspdir_acinclude()
+{
+cat << EOF > acinclude.m4~
+# RTEMS_CHECK_BSPDIR(RTEMS_BSP)
+AC_DEFUN([RTEMS_CHECK_BSPDIR],
+[
+ RTEMS_BSP_ALIAS(ifelse([\$1],,[\${RTEMS_BSP}],[\$1]),bspdir)
+ case "\$bspdir" in
+EOF
+
+for i in */bsp_specs; do
+ d=`dirname $i`
+cat << EOF >> acinclude.m4~
+ $d )
+ AC_CONFIG_SUBDIRS([$d]);;
+EOF
+done
+cat << EOF >> acinclude.m4~
+ *)
+ AC_MSG_ERROR([Invalid BSP]);;
+ esac
+])
+EOF
+if cmp -s acinclude.m4 acinclude.m4~ 2>/dev/null; then
+ echo "acinclude.m4 is unchanged";
+else
+ cp acinclude.m4~ acinclude.m4
+fi
+rm -f acinclude.m4~
+}
+
if test ! -f $top_srcdir/aclocal/version.m4; then
echo "${progname}:"
echo " Installation problem: Can't find file aclocal/version.m4"
@@ -105,6 +136,8 @@ EOF
configure=`basename $i`;
( test "$quiet" = "true" || echo "$dir";
cd $dir;
+ test -n "`grep RTEMS_CHECK_BSPDIR ${configure}`" && \
+ generate_bspdir_acinclude;
pat="s,\$(RTEMS_TOPdir),${aclocal_dir},g"
aclocal_args=`grep '^[ ]*ACLOCAL_AMFLAGS' Makefile.am | \
sed -e 's%.*ACLOCAL_AMFLAGS.*\=[ ]*%%g' -e $pat ` ;
@@ -158,5 +191,6 @@ clean)
find . -name '.deps' -print | xargs rm -rf
find . -name '.libs' -print | xargs rm -rf
find . -name 'stamp-h.in' | xargs rm -rf
+ find . -name 'autom4te*.cache' | xargs rm -rf
;;
esac