diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2002-08-09 05:01:03 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2002-08-09 05:01:03 +0000 |
commit | f0d7515908ea861f493003bd84432ffae680b707 (patch) | |
tree | aff5c69509214a57e00bf31e19f3656da32d9b3b | |
parent | 2002-08-09 Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff) | |
download | rtems-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
-rw-r--r-- | c/src/ChangeLog | 9 | ||||
-rw-r--r-- | c/src/Makefile.am | 21 | ||||
-rw-r--r-- | c/src/configure.ac | 38 |
3 files changed, 67 insertions, 1 deletions
diff --git a/c/src/ChangeLog b/c/src/ChangeLog index a30d43cf17..a01a8d501c 100644 --- a/c/src/ChangeLog +++ b/c/src/ChangeLog @@ -1,3 +1,12 @@ +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 + 2002-08-01 Ralf Corsepius <corsepiu@faw.uni-ulm.de> * Makefile.am: Clean $(PROJECT_RELEASE). diff --git a/c/src/Makefile.am b/c/src/Makefile.am index 3f49d3f9b1..98b075e424 100644 --- a/c/src/Makefile.am +++ b/c/src/Makefile.am @@ -9,5 +9,26 @@ SUBDIRS = @exec@ @subdirs@ clean-local: $(RM) -r $(PROJECT_RELEASE) +make/@RTEMS_BSP@.cache: make/bsp.mak @CUSTOM_CFG_FILES@ + $(RM) make/@RTEMS_BSP@.cache + $(MAKE) -f ${srcdir}/make/bsp.mak \ + RTEMS_BSP=@RTEMS_BSP@ RTEMS_ROOT=. \ + make/@RTEMS_BSP@.cache + +noinst_DATA = make/@RTEMS_BSP@.cache +DISTCLEANFILES = make/@RTEMS_BSP@.cache + +rtems_make_customdir = $(rtems_makedir)/custom +rtems_make_custom_DATA = @CUSTOM_CFG_FILES@ + +make/custom/default.cfg: $(srcdir)/make/custom/default.cfg.in + cp $< $@ + +make/custom/%.cfg: $(srcdir)/$(cfg_dir)/custom/%.cfg + cp $< $@ + +noinst_DATA += make/custom/default.cfg +DISTCLEANFILES += make/custom/default.cfg + include $(top_srcdir)/../../automake/subdirs.am include $(top_srcdir)/../../automake/host.am 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 |