From ef02bc18284ab94234a9af1e68d303c831fc87e1 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Fri, 26 Mar 2004 03:57:24 +0000 Subject: 2004-03-26 Ralf Corsepius * aclocal/rtems-top.m4: Add 2nd arg to RTEMS_TOP. Rework with_project_root/PROJECT_ROOT and with_project_top/PROJECT_TOPdir. --- c/src/ChangeLog | 5 +++++ c/src/aclocal/rtems-top.m4 | 18 +++++------------- 2 files changed, 10 insertions(+), 13 deletions(-) (limited to 'c') diff --git a/c/src/ChangeLog b/c/src/ChangeLog index 63499e19f2..cdd0c8895d 100644 --- a/c/src/ChangeLog +++ b/c/src/ChangeLog @@ -1,3 +1,8 @@ +2004-03-26 Ralf Corsepius + + * aclocal/rtems-top.m4: Add 2nd arg to RTEMS_TOP. + Rework with_project_root/PROJECT_ROOT and with_project_top/PROJECT_TOPdir. + 2004-03-25 Ralf Corsepius * configure.ac: Reflect changes to testsuites's configuration. diff --git a/c/src/aclocal/rtems-top.m4 b/c/src/aclocal/rtems-top.m4 index 0ada2648e1..0482d89fe9 100644 --- a/c/src/aclocal/rtems-top.m4 +++ b/c/src/aclocal/rtems-top.m4 @@ -19,21 +19,13 @@ AC_PREFIX_DEFAULT([/opt/rtems-][RTEMS_API]) AC_SUBST([RTEMS_TOPdir],["$1"]) -## with_target_subdirs is handled implicitly by autoconf -dots=`echo $with_target_subdir|\ -sed -e 's,^\.$,,' -e 's%^\./%%' -e 's%[[^/]]$%&/%' -e 's%[[^/]]*/%../%g'` +# HACK: The sed pattern in rtems_updir matches c/src/ +rtems_updir=m4_if([$2],[],[`echo "$1/" | sed s,^\.\.\/\.\.\/,,`],[$2/]) -PROJECT_TOPdir=${dots}${RTEMS_TOPdir}/'$(top_builddir)' -AC_SUBST([PROJECT_TOPdir]) +AC_SUBST([RTEMS_ROOT],[${rtems_updir}'$(top_builddir)']) -RTEMS_ROOT=`echo "$1/" | sed -e 's,^../../,,'`'$(top_builddir)' -AC_SUBST([RTEMS_ROOT]) - -PROJECT_ROOT="${RTEMS_TOPdir}/\$(top_builddir)" -AC_SUBST(PROJECT_ROOT) - -AC_MSG_CHECKING([for RTEMS Version]) -AC_MSG_RESULT([_RTEMS_VERSION]) +AC_SUBST([PROJECT_TOPdir],[${with_project_top}${rtems_updir}'$(top_builddir)']) +AC_SUBST([PROJECT_ROOT],[${with_project_root}${rtems_updir}'$(top_builddir)']) AC_SUBST([dirstamp],[\${am__leading_dot}dirstamp]) ])dnl -- cgit v1.2.3