summaryrefslogtreecommitdiffstats
path: root/c/src/configure.ac
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2009-10-14 06:35:53 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2009-10-14 06:35:53 +0000
commit31eae5580567b148abcec4e8a5f03431c53d7bd9 (patch)
tree2d4460ab7b33294d46ae065cb785ecda210cdf8a /c/src/configure.ac
parentChange *.cfg handling. (diff)
downloadrtems-31eae5580567b148abcec4e8a5f03431c53d7bd9.tar.bz2
Rework make/custom/* handling.
Diffstat (limited to 'c/src/configure.ac')
-rw-r--r--c/src/configure.ac30
1 files changed, 20 insertions, 10 deletions
diff --git a/c/src/configure.ac b/c/src/configure.ac
index 44575ca66c..21b4bd8076 100644
--- a/c/src/configure.ac
+++ b/c/src/configure.ac
@@ -31,29 +31,39 @@ 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
+cp ${srcdir}/make/custom/default.cfg.in make/custom/default.cfg
+cat << EOF > ${DEPDIR}/cfg.P
+# Do not edit - automatically generated by $0
+make/custom/default.cfg: \$(srcdir)/make/custom/default.cfg.in
+ @\$(MKDIR_P) make/custom
+ cp \$(srcdir)/make/custom/default.cfg.in make/custom/default.cfg
+EOF
# Collect and copy the BSP's make/custom/*.cfg files from the toplevel make
# directory into the build tree's <bsp>/make/custom subdirectories
CUSTOM_CFG_FILES=
-f="${RTEMS_BSP}.cfg"
+f="${RTEMS_BSP}"
while test -n "$f"; do
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"
+ cp ${cfg_file} make/custom/$f.cfg
+cat << EOF >> ${DEPDIR}/cfg.P
+make/custom/$f.cfg: ${cfg_file} make/custom/default.cfg
+ cp ${cfg_file} make/custom/$f.cfg
+EOF
+ CUSTOM_CFG_FILES="$CUSTOM_CFG_FILES make/custom/$f.cfg"
f=`grep "^include.*make/custom" ${cfg_file} \
| sed \
-e 's%^.*custom\/%%' \
-e s%\$\(RTEMS_HOST\)%${RTEMS_HOST}% \
- -e 's%default\.cfg%%'`;
+ -e 's%default\.cfg%%' \
+ -e 's%\.cfg$%%'`;
else break; fi;
done
-cp ${srcdir}/make/custom/default.cfg.in make/custom/default.cfg
+#${MAKE-make} -f ${DEPDIR}/cfg.P \
+# srcdir="${srcdir}" MKDIR_P="${MKDIR_P}" \
+# make/custom/default.cfg $CUSTOM_CFG_FILES
AC_MSG_NOTICE([creating make/${RTEMS_BSP}.cache])
${MAKE-make} -f ${srcdir}/make/bsp.mak \
@@ -88,7 +98,7 @@ CFLAGS="${CFLAGS-${CPU_CFLAGS} ${CFLAGS_OPTIMIZE_V}}"
AS_IF([test x"${CFLAGS}" != x" "],[
ac_configure_args="$ac_configure_args 'CFLAGS=${CFLAGS}'"])
-RTEMS_PROG_CC_FOR_TARGET
+RTEMS_PROG_CC_FOR_TARGET([-std=c99 -fasm])
AM_PROG_CC_C_O
RTEMS_PROG_CCAS
RTEMS_CANONICALIZE_TOOLS