forked from Imagelibrary/rtems
Rework make/custom/* handling.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user