forked from Imagelibrary/rtems
2009-10-17 Ralf Corsepius <ralf.corsepius@rtems.org>
* configure.ac: Pick up make/custom/*. * aclocal/check-custom-bsp.m4: Adapt to changes to configure.ac.
This commit is contained in:
@@ -1,25 +1,21 @@
|
|||||||
dnl $Id$
|
dnl $Id$
|
||||||
|
|
||||||
AC_DEFUN([_RTEMS_CHECK_CUSTOM_BSP],[
|
AC_DEFUN([_RTEMS_CHECK_CUSTOM_BSP],[
|
||||||
|
AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])dnl sets RTEMS_CPU, target
|
||||||
|
AC_REQUIRE([RTEMS_TOP])dnl sets RTEMS_TOPdir
|
||||||
$2=
|
$2=
|
||||||
for i in \
|
for i in \
|
||||||
"${srcdir}/${RTEMS_TOPdir}/c/src/lib/libbsp/${RTEMS_CPU}"/*/make/custom/$1.cfg \
|
`ls "${srcdir}/${RTEMS_TOPdir}/c/src/lib/libbsp/${RTEMS_CPU}"/*/make/custom/$1 2>/dev/null`;
|
||||||
"${srcdir}/${RTEMS_TOPdir}/make/custom/"$1.cfg;
|
|
||||||
do
|
do
|
||||||
AC_MSG_CHECKING([for $i])
|
|
||||||
AS_IF([test -r $i],[
|
AS_IF([test -r $i],[
|
||||||
$2="$i"
|
$2="$i"
|
||||||
AC_MSG_RESULT([yes])
|
break
|
||||||
break;
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
])
|
])
|
||||||
done
|
done
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([RTEMS_CHECK_CUSTOM_BSP],[
|
AC_DEFUN([RTEMS_CHECK_CUSTOM_BSP],[
|
||||||
AC_REQUIRE([RTEMS_TOP])
|
_RTEMS_CHECK_CUSTOM_BSP([[$]$1.cfg],[BSP_FOUND])
|
||||||
_RTEMS_CHECK_CUSTOM_BSP([[$]$1],[BSP_FOUND])
|
|
||||||
AS_IF([test -z "$BSP_FOUND"],[
|
AS_IF([test -z "$BSP_FOUND"],[
|
||||||
AC_MSG_ERROR([missing [$]$1.cfg])
|
AC_MSG_ERROR([missing [$]$1.cfg])
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -42,22 +42,21 @@ 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}"
|
f="${RTEMS_BSP}.cfg"
|
||||||
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.cfg
|
cp ${cfg_file} make/custom/$f
|
||||||
cat << EOF >> ${DEPDIR}/cfg.P
|
cat << EOF >> ${DEPDIR}/cfg.P
|
||||||
make/custom/$f.cfg: ${cfg_file} make/custom/default.cfg
|
make/custom/$f: ${cfg_file} make/custom/default.cfg
|
||||||
cp ${cfg_file} make/custom/$f.cfg
|
cp ${cfg_file} make/custom/$f
|
||||||
EOF
|
EOF
|
||||||
CUSTOM_CFG_FILES="$CUSTOM_CFG_FILES make/custom/$f.cfg"
|
CUSTOM_CFG_FILES="$CUSTOM_CFG_FILES make/custom/$f"
|
||||||
f=`grep "^include.*make/custom" ${cfg_file} \
|
f=`grep "^include.*make/custom" ${cfg_file} \
|
||||||
| sed \
|
| sed \
|
||||||
-e 's%^.*custom\/%%' \
|
-e 's%^.*custom\/%%' \
|
||||||
-e 's%default\.cfg%%' \
|
-e 's%default\.cfg%%'`;
|
||||||
-e 's%\.cfg$%%'`;
|
|
||||||
else break; fi;
|
else break; fi;
|
||||||
done
|
done
|
||||||
#${MAKE-make} -f ${DEPDIR}/cfg.P \
|
#${MAKE-make} -f ${DEPDIR}/cfg.P \
|
||||||
|
|||||||
Reference in New Issue
Block a user