diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2004-03-25 08:22:14 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2004-03-25 08:22:14 +0000 |
commit | 93a0f2b654b148163d6871c632cd28af79096c18 (patch) | |
tree | 6b9812d7542bf8c8665d04412ba751c20e3bab15 /testsuites/aclocal | |
parent | 2004-03-25 Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff) | |
download | rtems-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/aclocal')
-rw-r--r-- | testsuites/aclocal/rtems-top.m4 | 33 |
1 files changed, 19 insertions, 14 deletions
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 |