summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2004-03-25 08:22:14 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2004-03-25 08:22:14 +0000
commit93a0f2b654b148163d6871c632cd28af79096c18 (patch)
tree6b9812d7542bf8c8665d04412ba751c20e3bab15 /testsuites
parent2004-03-25 Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff)
downloadrtems-93a0f2b654b148163d6871c632cd28af79096c18.tar.bz2
2004-03-25 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* 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.
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/ChangeLog6
-rw-r--r--testsuites/aclocal/rtems-top.m433
2 files changed, 25 insertions, 14 deletions
diff --git a/testsuites/ChangeLog b/testsuites/ChangeLog
index 48426cfe88..2522adc9bc 100644
--- a/testsuites/ChangeLog
+++ b/testsuites/ChangeLog
@@ -1,5 +1,11 @@
2004-03-25 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+ * 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 <corsepiu@faw.uni-ulm.de>
+
* aclocal/enable-bare.m4, aclocal/enable-cxx.m4,
aclocal/enable-itron.m4, aclocal/enable-multiprocessing.m4,
aclocal/enable-networking.m4, aclocal/enable-posix.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