diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2009-10-21 10:10:45 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2009-10-21 10:10:45 +0000 |
commit | 67bb1733a5f5a329000fbfc5c6ca182564b8c094 (patch) | |
tree | 240ebcf99422f546a66aa92c69d1fb85ba5ba980 | |
parent | 2009-10-21 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-67bb1733a5f5a329000fbfc5c6ca182564b8c094.tar.bz2 |
2009-10-21 Ralf Corsépius <ralf.corsepius@rtems.org>
* aclocal/bsp-alias.m4: New.
* configure.ac: Apply RTEMS_BSP_ALIAS for RTEMS_BSP_FAMILY.
-rw-r--r-- | c/src/ChangeLog | 5 | ||||
-rw-r--r-- | c/src/aclocal/bsp-alias.m4 | 22 | ||||
-rw-r--r-- | c/src/configure.ac | 2 |
3 files changed, 28 insertions, 1 deletions
diff --git a/c/src/ChangeLog b/c/src/ChangeLog index ca1e710172..d9443504d5 100644 --- a/c/src/ChangeLog +++ b/c/src/ChangeLog @@ -1,5 +1,10 @@ 2009-10-21 Ralf Corsépius <ralf.corsepius@rtems.org> + * aclocal/bsp-alias.m4: New. + * configure.ac: Apply RTEMS_BSP_ALIAS for RTEMS_BSP_FAMILY. + +2009-10-21 Ralf Corsépius <ralf.corsepius@rtems.org> + * aclocal/env-rtemsbsp.m4: Remove AM_CONDITIONAL MULTILIB. 2009-10-21 Ralf Corsépius <ralf.corsepius@rtems.org> diff --git a/c/src/aclocal/bsp-alias.m4 b/c/src/aclocal/bsp-alias.m4 new file mode 100644 index 0000000000..bfee2cb7cf --- /dev/null +++ b/c/src/aclocal/bsp-alias.m4 @@ -0,0 +1,22 @@ +dnl +dnl $Id$ +dnl + +dnl _RTEMS_BSP_ALIAS(BSP_ALIAS,RTEMS_BSP_FAMILY) +dnl Internal subroutine to RTEMS_BSP_ALIAS +AC_DEFUN([_RTEMS_BSP_ALIAS], +[# account for "aliased" bsps which share source code + for bsp_cfgs in `ls "$srcdir/$RTEMS_TOPdir/c/src/lib/libbsp/$RTEMS_CPU/"*"/make/custom/$1.cfg" 2>/dev/null`; do + $2=`echo "$bsp_cfgs" | sed \ + -e "s,^$srcdir/$RTEMS_TOPdir/c/src/lib/libbsp/$RTEMS_CPU/,," \ + -e "s,/make/custom/.*\.cfg$,,"` + break + done +]) + +dnl RTEMS_BSP_ALIAS(BSP_ALIAS,RTEMS_BSP_FAMILY) +dnl convert a bsp alias $1 into its bsp directory RTEMS_BSP_FAMILY +AC_DEFUN([RTEMS_BSP_ALIAS], +[_RTEMS_BSP_ALIAS(m4_if([$1],,[$RTEMS_BSP],[$1]), + m4_if([$2],,[RTEMS_BSP_FAMILY],[$2]))] +) diff --git a/c/src/configure.ac b/c/src/configure.ac index 7207cb2189..9e6052e9b7 100644 --- a/c/src/configure.ac +++ b/c/src/configure.ac @@ -77,7 +77,7 @@ test -n "${RTEMS_CPU_MODEL}" && \ ac_configure_args="$ac_configure_args 'RTEMS_CPU_MODEL=${RTEMS_CPU_MODEL}'" AC_CACHE_CHECK([for RTEMS_BSP_FAMILY],[ac_cv_env_RTEMS_BSP_FAMILY], -[. ./make/${RTEMS_BSP}.cache]) +[RTEMS_BSP_ALIAS([${RTEMS_BSP}],[ac_cv_env_RTEMS_BSP_FAMILY])]) RTEMS_BSP_FAMILY=$ac_cv_env_RTEMS_BSP_FAMILY AC_SUBST(RTEMS_BSP_FAMILY) test -n "${RTEMS_BSP_FAMILY}" && \ |