From 93a0f2b654b148163d6871c632cd28af79096c18 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Thu, 25 Mar 2004 08:22:14 +0000 Subject: 2004-03-25 Ralf Corsepius * aclocal/rtems-top.m4: Add 2nd arg to RTEMS_TOP. Rework with_project_root/PROJECT_ROOT and with_project_top/PROJECT_TOPdir. Add --enable-rtems-root. Rework RTEMS_ROOT. --- testsuites/ChangeLog | 6 ++++++ testsuites/aclocal/rtems-top.m4 | 33 +++++++++++++++++++-------------- 2 files changed, 25 insertions(+), 14 deletions(-) (limited to 'testsuites') diff --git a/testsuites/ChangeLog b/testsuites/ChangeLog index 48426cfe88..2522adc9bc 100644 --- a/testsuites/ChangeLog +++ b/testsuites/ChangeLog @@ -1,3 +1,9 @@ +2004-03-25 Ralf Corsepius + + * aclocal/rtems-top.m4: Add 2nd arg to RTEMS_TOP. + Rework with_project_root/PROJECT_ROOT and with_project_top/PROJECT_TOPdir. + Add --enable-rtems-root. Rework RTEMS_ROOT. + 2004-03-25 Ralf Corsepius * aclocal/enable-bare.m4, aclocal/enable-cxx.m4, diff --git a/testsuites/aclocal/rtems-top.m4 b/testsuites/aclocal/rtems-top.m4 index 8e8052896e..9c5072f526 100644 --- a/testsuites/aclocal/rtems-top.m4 +++ b/testsuites/aclocal/rtems-top.m4 @@ -21,20 +21,25 @@ AC_PREFIX_DEFAULT([/opt/rtems-][RTEMS_API]) ENDIF=endif AC_SUBST(ENDIF) -RTEMS_TOPdir="$1"; -AC_SUBST(RTEMS_TOPdir) - -## with_target_subdirs is handled implicitly by autoconf -dots=`echo $with_target_subdir|\ -sed -e 's,^\.$,,' -e 's%^\./%%' -e 's%[[^/]]$%&/%' -e 's%[[^/]]*/%../%g'` -PROJECT_TOPdir=${dots}${RTEMS_TOPdir}/'$(top_builddir)' -AC_SUBST([PROJECT_TOPdir]) - -RTEMS_ROOT=$with_rtems_root`echo "$1/" | sed 's,^../,,'`'$(top_builddir)' -AC_SUBST(RTEMS_ROOT) - -PROJECT_ROOT=$with_project_root`echo "$1/" | sed 's,^../,,'`'$(top_builddir)' -AC_SUBST(PROJECT_ROOT) +AC_SUBST([RTEMS_TOPdir],["$1"]) + +rtems_updir=m4_if([$2],[],[],[$2/]) + +AC_ARG_ENABLE([rtems-root],[ +AS_HELP_STRING(--enable-rtems-root,directory containing make/custom)], +[case ${enable_rtems_root} in + [[\\/$]]* | ?:[[\\/]]* ) # absolute directory + RTEMS_ROOT=${enable_rtems_root} + ;; + *) # relative directory + RTEMS_ROOT=${enable_rtems_root}${rtems_updir}'$(top_builddir)' + ;; +esac], +[RTEMS_ROOT=${rtems_updir}'$(top_builddir)']) +AC_SUBST([RTEMS_ROOT]) + +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