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}
|
test -d ${DEPDIR} || mkdir ${DEPDIR}
|
||||||
|
|
||||||
rm -f ${DEPDIR}/cfg.P
|
rm -f ${DEPDIR}/cfg.P
|
||||||
echo "# Do not edit - automatically generated by" > ${DEPDIR}/cfg.P
|
cp ${srcdir}/make/custom/default.cfg.in make/custom/default.cfg
|
||||||
echo "# $0" >> ${DEPDIR}/cfg.P
|
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
|
# Collect and copy the BSP's make/custom/*.cfg files from the toplevel make
|
||||||
# directory into the build tree's <bsp>/make/custom subdirectories
|
# directory into the build tree's <bsp>/make/custom subdirectories
|
||||||
CUSTOM_CFG_FILES=
|
CUSTOM_CFG_FILES=
|
||||||
f="${RTEMS_BSP}.cfg"
|
f="${RTEMS_BSP}"
|
||||||
while test -n "$f"; do
|
while test -n "$f"; do
|
||||||
cfg_file=
|
cfg_file=
|
||||||
_RTEMS_CHECK_CUSTOM_BSP([$f],cfg_file)
|
_RTEMS_CHECK_CUSTOM_BSP([$f],cfg_file)
|
||||||
if test -n "${cfg_file}"; then
|
if test -n "${cfg_file}"; then
|
||||||
cp ${cfg_file} make/custom/$f
|
cp ${cfg_file} make/custom/$f.cfg
|
||||||
echo "make/custom/$f: ${cfg_file}" >> ${DEPDIR}/cfg.P
|
cat << EOF >> ${DEPDIR}/cfg.P
|
||||||
echo " cp ${cfg_file} make/custom/$f" >> ${DEPDIR}/cfg.P
|
make/custom/$f.cfg: ${cfg_file} make/custom/default.cfg
|
||||||
CUSTOM_CFG_FILES="$CUSTOM_CFG_FILES make/custom/$f"
|
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} \
|
f=`grep "^include.*make/custom" ${cfg_file} \
|
||||||
| sed \
|
| sed \
|
||||||
-e 's%^.*custom\/%%' \
|
-e 's%^.*custom\/%%' \
|
||||||
-e s%\$\(RTEMS_HOST\)%${RTEMS_HOST}% \
|
-e s%\$\(RTEMS_HOST\)%${RTEMS_HOST}% \
|
||||||
-e 's%default\.cfg%%'`;
|
-e 's%default\.cfg%%' \
|
||||||
|
-e 's%\.cfg$%%'`;
|
||||||
else break; fi;
|
else break; fi;
|
||||||
done
|
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])
|
AC_MSG_NOTICE([creating make/${RTEMS_BSP}.cache])
|
||||||
${MAKE-make} -f ${srcdir}/make/bsp.mak \
|
${MAKE-make} -f ${srcdir}/make/bsp.mak \
|
||||||
@@ -88,7 +98,7 @@ CFLAGS="${CFLAGS-${CPU_CFLAGS} ${CFLAGS_OPTIMIZE_V}}"
|
|||||||
AS_IF([test x"${CFLAGS}" != x" "],[
|
AS_IF([test x"${CFLAGS}" != x" "],[
|
||||||
ac_configure_args="$ac_configure_args 'CFLAGS=${CFLAGS}'"])
|
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
|
AM_PROG_CC_C_O
|
||||||
RTEMS_PROG_CCAS
|
RTEMS_PROG_CCAS
|
||||||
RTEMS_CANONICALIZE_TOOLS
|
RTEMS_CANONICALIZE_TOOLS
|
||||||
|
|||||||
Reference in New Issue
Block a user