summaryrefslogtreecommitdiffstats
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
parent30d1a28f184a5c30972c5579c9aa257a02c420c5 (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.
-rw-r--r--ChangeLog7
-rwxr-xr-xbootstrap36
2 files changed, 42 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 62d401bcfb..1b48b88e8b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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.
+
2002-10-29 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* aclocal/enable-bare.m4: Improve quoting of AC_HELP_STRING.
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