diff options
Diffstat (limited to 'c')
-rw-r--r-- | c/src/ChangeLog | 11 | ||||
-rw-r--r-- | c/src/acinclude.m4 | 15 | ||||
-rw-r--r-- | c/src/aclocal/rtems-top.m4 | 23 | ||||
-rw-r--r-- | c/src/configure.ac | 30 |
4 files changed, 40 insertions, 39 deletions
diff --git a/c/src/ChangeLog b/c/src/ChangeLog index eca3f698e9..09ad41b22a 100644 --- a/c/src/ChangeLog +++ b/c/src/ChangeLog @@ -1,5 +1,16 @@ 2004-02-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de> + * acinclude.m4: Fix loosing arguments when configuring cpukit and + testsuites (Was exposed with --enable-multilib, only). + Remove RTEMS_SUBCONFIGURE_ARGS_QUOTE. RTEMS_CONFIG_SUBDIR. + Add RTEMS_BSP_CONFIG_SUBDIR. + * configure.ac: Reflect changes to acinclude.m4. Reflect new args to + testsuites's configure. + * aclocal/rtems-top.m4: Remove ENDIF hack. + Rework and fix setting up PROJECT_TOPdir (PACKHEX wasn't found). + +2004-02-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de> + * libchip/Makefile.am, librdbg/Makefile.am, optman/Makefile.am, wrapup/Makefile.am: Fix automake problems having been introduced in previous patch. diff --git a/c/src/acinclude.m4 b/c/src/acinclude.m4 index c99d427695..891da200fc 100644 --- a/c/src/acinclude.m4 +++ b/c/src/acinclude.m4 @@ -5,13 +5,8 @@ # Note: Consider this file a temporary band-aid until a better, more general # subdirectory handling solution is introduced to RTEMS. -AC_DEFUN([RTEMS_SUBCONFIGURE_ARGS_QUOTE], +AC_DEFUN([_RTEMS_CONFIG_SUBDIR], [ - RTEMS_CONFIGURE_ARGS_QUOTE([ac_sub_configure_args]) -]) - -AC_DEFUN([RTEMS_CONFIG_SUBDIR], -[AC_REQUIRE([RTEMS_SUBCONFIGURE_ARGS_QUOTE]) if test "$no_recursion" != yes; then ac_sub_sourcedir=$2 ac_sub_builddir=$1 @@ -81,3 +76,11 @@ if test "$no_recursion" != yes; then done fi ]) + +## RTEMS_BSP_CONFIG_SUBDIR(builddir,srcdir,configargs,condition) +AC_DEFUN([RTEMS_BSP_CONFIG_SUBDIR],[ +m4_expand_once([RTEMS_CONFIGURE_ARGS_QUOTE([ac_sub_configure_args])]) +AS_IF([$4],[BSP_SUBDIRS="$BSP_SUBDIRS $1"]) +AC_CONFIG_COMMANDS_POST([ +AS_IF([$4],[_RTEMS_CONFIG_SUBDIR([$1],[$2],[$3])])]) +]) diff --git a/c/src/aclocal/rtems-top.m4 b/c/src/aclocal/rtems-top.m4 index 78e95c9d6d..0ada2648e1 100644 --- a/c/src/aclocal/rtems-top.m4 +++ b/c/src/aclocal/rtems-top.m4 @@ -17,26 +17,17 @@ AC_BEFORE([$0], [AM_INIT_AUTOMAKE])dnl AC_PREFIX_DEFAULT([/opt/rtems-][RTEMS_API]) -## HACK to allow gnu-make conditionals in automake-Makefiles. -ENDIF=endif -AC_SUBST(ENDIF) - -RTEMS_TOPdir="$1"; -AC_SUBST(RTEMS_TOPdir) +AC_SUBST([RTEMS_TOPdir],["$1"]) ## with_target_subdirs is handled implicitly by autoconf -test -n "$with_target_subdir" || with_target_subdir="." - -if test "$with_target_subdir" = "." ; then -# Native -PROJECT_TOPdir=${RTEMS_TOPdir}/'$(top_builddir)' -else -# Cross dots=`echo $with_target_subdir|\ -sed -e 's%^\./%%' -e 's%[[^/]]$%&/%' -e 's%[[^/]]*/%../%g'` +sed -e 's,^\.$,,' -e 's%^\./%%' -e 's%[[^/]]$%&/%' -e 's%[[^/]]*/%../%g'` + PROJECT_TOPdir=${dots}${RTEMS_TOPdir}/'$(top_builddir)' -fi -AC_SUBST(PROJECT_TOPdir) +AC_SUBST([PROJECT_TOPdir]) + +RTEMS_ROOT=`echo "$1/" | sed -e 's,^../../,,'`'$(top_builddir)' +AC_SUBST([RTEMS_ROOT]) PROJECT_ROOT="${RTEMS_TOPdir}/\$(top_builddir)" AC_SUBST(PROJECT_ROOT) diff --git a/c/src/configure.ac b/c/src/configure.ac index 5ec98e6db3..5bbd2c3670 100644 --- a/c/src/configure.ac +++ b/c/src/configure.ac @@ -117,16 +117,12 @@ AC_SUBST(cfg_dir) RTEMS_CHECK_MULTIPROCESSING +BSP_SUBDIRS= ## Configure ${srcdir}/../../cpukit as cpukit/ if multilibs are disabled -AS_IF([test x"$multilib" = x"no"],[ - AC_CONFIG_COMMANDS_POST([ - if test x"$multilib" = x"no"; then - RTEMS_CONFIG_SUBDIR([cpukit],[../../cpukit], - ['--with-project-root=../../..' '--enable-rtemsbsp=$RTEMS_BSP']) - fi - ]) - BSP_SUBDIRS="cpukit" -]) +RTEMS_BSP_CONFIG_SUBDIR( + [cpukit],[../../cpukit], + ['--with-project-root=../../..' '--enable-rtemsbsp=$RTEMS_BSP'], + [test x"$multilib" = x"no"]) ## Note: the order of the directories below is essential AC_CONFIG_SUBDIRS([make]) @@ -179,14 +175,14 @@ AS_IF([test x"$enable_ada" = x"yes"],[ ]) ]) -AS_IF([test -d ${srcdir}/../../testsuites],[ - BSP_SUBDIRS="$BSP_SUBDIRS testsuites" -]) - - AC_CONFIG_COMMANDS_POST([ - RTEMS_CONFIG_SUBDIR([testsuites],[../../testsuites], - ['--with-project-root=../../' '--enable-rtemsbsp=$RTEMS_BSP']) - ]) +RTEMS_BSP_CONFIG_SUBDIR( + [testsuites],[../../testsuites], + ['--with-target-subdir=$with_target_subdir/c/$RTEMS_BSP' \ + '--with-rtems-root=../' \ + '--with-project-root=../../../' \ + '--enable-rtemsbsp=$RTEMS_BSP' \ + ], + [test x"$enable_tests" != x"no"]) AC_SUBST([BSP_SUBDIRS],[$BSP_SUBDIRS]) |