summaryrefslogtreecommitdiffstats
path: root/c/src/configure.ac
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2002-08-09 05:01:03 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2002-08-09 05:01:03 +0000
commitf0d7515908ea861f493003bd84432ffae680b707 (patch)
treeaff5c69509214a57e00bf31e19f3656da32d9b3b /c/src/configure.ac
parent2002-08-09 Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff)
downloadrtems-f0d7515908ea861f493003bd84432ffae680b707.tar.bz2
2002-08-09 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* Makefile.am: Create make/@RTEMS_BSP@.cache. Handle make/custom/*.cfgs. Create make/custom/default.cfg. * configure.ac: Add creation of make/custon/*.cfg. Create make/${RTEMS_BSP}.cache. Read make/${RTEMS_BSP}.cache
Diffstat (limited to 'c/src/configure.ac')
-rw-r--r--c/src/configure.ac38
1 files changed, 37 insertions, 1 deletions
diff --git a/c/src/configure.ac b/c/src/configure.ac
index e7a10ec7bd..8f160e42c2 100644
--- a/c/src/configure.ac
+++ b/c/src/configure.ac
@@ -26,6 +26,38 @@ RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
RTEMS_CHECK_NETWORKING(RTEMS_BSP)
+AC_MSG_NOTICE([setting up make/custom])
+
+AS_MKDIR_P([make/custom])
+
+# Collect and copy the BSP's make/custom/*.cfg files from the toplevel make
+# directory into the build tree's <bsp>/make/custom subdirectories
+cfg_dir="${RTEMS_TOPdir}/make"
+CUSTOM_CFG_FILES=""
+f="${RTEMS_BSP}.cfg"
+while test -n "$f"; do
+ if test -r "${srcdir}/${cfg_dir}/custom/$f"; then
+ cp ${srcdir}/${cfg_dir}/custom/$f make/custom/$f
+ CUSTOM_CFG_FILES="$CUSTOM_CFG_FILES make/custom/$f"
+ f=`grep "^include.*make/custom" ${srcdir}/${cfg_dir}/custom/$f \
+ | sed \
+ -e 's%^.*custom\/%%' \
+ -e s%\$\(RTEMS_HOST\)%${RTEMS_HOST}% \
+ -e 's%default\.cfg%%'`;
+ else break; fi;
+done
+cp ${srcdir}/make/custom/default.cfg.in make/custom/default.cfg
+
+AC_MSG_NOTICE([creating make/${RTEMS_BSP}.cache])
+${MAKE-make} -f ${srcdir}/make/bsp.mak RTEMS_BSP=${RTEMS_BSP} \
+RTEMS_ROOT=. make/${RTEMS_BSP}.cache
+
+# Read back the cache
+RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)
+
+AC_SUBST(CUSTOM_CFG_FILES)
+AC_SUBST(cfg_dir)
+
## Note: the order of the directories below is essential
AC_CONFIG_SUBDIRS([make])
@@ -68,5 +100,9 @@ AC_CONFIG_SUBDIRS(wrapup tests)
RTEMS_PROJECT_ROOT
# Explicitly list all Makefiles here
-AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([Makefile],
+[${MAKE} make/${RTEMS_BSP}.cache],
+[RTEMS_BSP=${RTEMS_BSP}
+ MAKE=${MAKE}])
+
AC_OUTPUT