summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2004-11-05 08:30:18 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2004-11-05 08:30:18 +0000
commit9bb5b9d110ad2593cc71d739d3a6f50c67db74b4 (patch)
treeb3dfdb7389f8c71e187918ff6e7b34cef3020f22 /c
parent2004-11-04 Ralf Corsepius <ralf_corsepiu@rtems.org> (diff)
downloadrtems-9bb5b9d110ad2593cc71d739d3a6f50c67db74b4.tar.bz2
2004-11-05 Ralf Corsepius <ralf_corsepius@rtems.org>
* configure.ac: Remove check for libbsp/${RTEMS_CPU}. Add dependency tracking for *.cfgs. * Makefile.am: Add dependency tracking for *.cfg.
Diffstat (limited to 'c')
-rw-r--r--c/src/ChangeLog6
-rw-r--r--c/src/Makefile.am6
-rw-r--r--c/src/configure.ac28
3 files changed, 23 insertions, 17 deletions
diff --git a/c/src/ChangeLog b/c/src/ChangeLog
index c285f799a3..b304f2f3fa 100644
--- a/c/src/ChangeLog
+++ b/c/src/ChangeLog
@@ -1,3 +1,9 @@
+2004-11-05 Ralf Corsepius <ralf_corsepius@rtems.org>
+
+ * configure.ac: Remove check for libbsp/${RTEMS_CPU}.
+ Add dependency tracking for *.cfgs.
+ * Makefile.am: Add dependency tracking for *.cfg.
+
2004-11-03 Ralf Corsepius <ralf_corsepius@rtems.org>
* libchip/rtc/mc146818a.c: Don't include <bsp.h>
diff --git a/c/src/Makefile.am b/c/src/Makefile.am
index 6c402dcb45..ede2576a6d 100644
--- a/c/src/Makefile.am
+++ b/c/src/Makefile.am
@@ -27,9 +27,6 @@ DISTCLEANFILES += @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
@@ -47,5 +44,8 @@ pkgconfigdir = $(prefix)/lib/pkgconfig
pkgconfig_DATA = @host_alias@-@RTEMS_BSP@.pc
DISTCLEANFILES += @host_alias@-@RTEMS_BSP@.pc
+DISTCLEANFILES += $(DEPDIR)/cfg.P
+include $(DEPDIR)/cfg.P
+
include $(top_srcdir)/automake/subdirs.am
include $(top_srcdir)/automake/local.am
diff --git a/c/src/configure.ac b/c/src/configure.ac
index 900f9f701b..712d8a3b98 100644
--- a/c/src/configure.ac
+++ b/c/src/configure.ac
@@ -20,15 +20,6 @@ RTEMS_ENABLE_MULTILIB
RTEMS_ENABLE_MULTIPROCESSING
RTEMS_ENV_RTEMSBSP
-# Is this a supported CPU?
-AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported])
-# FIXME: Temporary hack
-if test -d "$srcdir/lib/libbsp/$RTEMS_CPU"; then
- AC_MSG_RESULT(yes)
-else
- AC_MSG_ERROR(no)
-fi
-
AC_ARG_ENABLE(rpcgen,
[AS_HELP_STRING([--enable-rpcgen],[rebuild rpcgen-generated sources])],
[case "${enable_rpcgen}" in
@@ -53,17 +44,26 @@ AC_PROG_AWK
AC_MSG_NOTICE([setting up make/custom])
AS_MKDIR_P([make/custom])
+AM_SET_DEPDIR
+test -d ${DEPDIR} || mkdir ${DEPDIR}
+
+rm -f ${DEPDIR}/cfg.P
+echo "# Do not edit - automatically generated by" > ${DEPDIR}/cfg.P
+echo "# $0" >> ${DEPDIR}/cfg.P
# 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=""
+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
+ cfg_file=
+ _RTEMS_CHECK_CUSTOM_BSP([$f],cfg_file)
+ if test -n "${cfg_file}"; then
+ cp ${cfg_file} make/custom/$f
+ echo "make/custom/$f: ${cfg_file}" >> ${DEPDIR}/cfg.P
+ echo " cp ${cfg_file} make/custom/$f" >> ${DEPDIR}/cfg.P
CUSTOM_CFG_FILES="$CUSTOM_CFG_FILES make/custom/$f"
- f=`grep "^include.*make/custom" ${srcdir}/${cfg_dir}/custom/$f \
+ f=`grep "^include.*make/custom" ${cfg_file} \
| sed \
-e 's%^.*custom\/%%' \
-e s%\$\(RTEMS_HOST\)%${RTEMS_HOST}% \