summaryrefslogtreecommitdiffstats
path: root/tools/build/aclocal.m4
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tools/build/aclocal.m411
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/build/aclocal.m4 b/tools/build/aclocal.m4
index 40c08bdfa0..019b89fb09 100644
--- a/tools/build/aclocal.m4
+++ b/tools/build/aclocal.m4
@@ -19,10 +19,16 @@ dnl $1 .. relative path from this configure.in to the toplevel configure.in
dnl
AC_DEFUN(RTEMS_TOP,
[dnl
+AC_ARG_WITH(target-subdir,
+[ --with-target-subdir=DIR],
+TARGET_SUBDIR="$withval",
+TARGET_SUBDIR=".")
+
RTEMS_TOPdir="$1";
AC_SUBST(RTEMS_TOPdir)
PROJECT_ROOT=`pwd`/$RTEMS_TOPdir;
+test "$TARGET_SUBDIR" = "." || PROJECT_ROOT="$PROJECT_ROOT/.."
AC_SUBST(PROJECT_ROOT)
dnl Determine RTEMS Version string from the VERSION file
@@ -41,9 +47,8 @@ AC_MSG_ERROR(Unable to determine version)
fi
AC_MSG_RESULT($RTEMS_VERSION)
-dnl FIXME: This once gets activated in future or will be removed
-dnl RTEMS_ROOT='$(top_srcdir)'/$RTEMS_TOPdir;
-dnl AC_SUBST(RTEMS_ROOT)
+RTEMS_ROOT='$(top_srcdir)'/$RTEMS_TOPdir;
+AC_SUBST(RTEMS_ROOT)
])dnl
# Do all the work for Automake. This macro actually does too much --