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
This commit is contained in:
Ralf Corsepius
2002-08-09 05:01:03 +00:00
parent 2e5499221f
commit f0d7515908
3 changed files with 67 additions and 1 deletions

View File

@@ -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).

View File

@@ -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

View File

@@ -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