summaryrefslogtreecommitdiffstats
path: root/cpukit/aclocal
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2004-01-21 17:56:37 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2004-01-21 17:56:37 +0000
commitfaf45cca28549fba8ac7dc68d3f614d6a7d2543d (patch)
tree0796458b0e71d72de2b7f4d532bc0d47f4c3aff7 /cpukit/aclocal
parent2004-01-21 Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff)
downloadrtems-faf45cca28549fba8ac7dc68d3f614d6a7d2543d.tar.bz2
2004-01-21 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* aclocal/rtems-top.m4: Remove PROJECT_ROOT. Prepend ../ to $1. * aclocal/env-rtemscpu.m4: Reworked. * configure.ac: RTEMS_TOP([.]).
Diffstat (limited to 'cpukit/aclocal')
-rw-r--r--cpukit/aclocal/env-rtemscpu.m473
-rw-r--r--cpukit/aclocal/rtems-top.m46
2 files changed, 54 insertions, 25 deletions
diff --git a/cpukit/aclocal/env-rtemscpu.m4 b/cpukit/aclocal/env-rtemscpu.m4
index b93fbb7c13..d5e27bf8b9 100644
--- a/cpukit/aclocal/env-rtemscpu.m4
+++ b/cpukit/aclocal/env-rtemscpu.m4
@@ -1,52 +1,83 @@
dnl $Id$
+# PROJECT_ROOT .. Directory to put the temporary installed files into
+
+# FIXME: to be revisited - featureladden, bloated
AC_DEFUN([RTEMS_ENV_RTEMSCPU],
[
AC_REQUIRE([RTEMS_ENABLE_MULTILIB])
- AS_IF([test x"$multilib" = x"yes"],
- [
- AS_IF([test -n "$with_multisubdir"],
- [MULTIBUILDTOP=`echo "/$with_multisubdir" | sed 's,/[[^\\/]]*,../,g'`])
- AC_SUBST(MULTIBUILDTOP)
-
- AS_IF([test -n "$with_multisubdir"],
- [MULTISUBDIR="/$with_multisubdir"])
- AC_SUBST(MULTISUBDIR)
-
- AC_SUBST([PROJECT_INCLUDE],["${PROJECT_ROOT}/lib/include"])
- AC_SUBST([PROJECT_LIB],["${PROJECT_ROOT}/lib\$(MULTISUBDIR)"])
+ # RTEMS_TOPdir points to the top of RTEMS source tree
+ # cpukit_topdir points to the top of the cpukit source tree
+ cpukit_topdir="/${RTEMS_TOPdir}/"
- includedir="\${exec_prefix}/include"
- libdir="${libdir}\$(MULTISUBDIR)"
- ],
- [
+ AS_IF([test -n "$enable_rtemsbsp"],
+ [ # Per BSP
AC_ARG_VAR([CPU_CFLAGS],[])
AC_ARG_VAR([CFLAGS_OPTIMIZE_V],
[CFLAGS for building the optimized variant])
AC_ARG_VAR([CFLAGS_DEBUG_V],
[CFLAGS for building the debugging variant])
- AC_ARG_VAR([RTEMS_BSP],[RTEMS_BSP to build])
AC_MSG_CHECKING([for RTEMS_BSP])
AC_CACHE_VAL(rtems_cv_RTEMS_BSP,[
- test -n "${RTEMS_BSP}" && rtems_cv_RTEMS_BSP="$RTEMS_BSP"
+ test -n "${RTEMS_BSP}" && rtems_cv_RTEMS_BSP="$enable_rtemsbsp"
])
AS_IF([test -z "$rtems_cv_RTEMS_BSP"],[
AC_MSG_ERROR([Missing RTEMS_BSP])
])
RTEMS_BSP="$rtems_cv_RTEMS_BSP"
AC_MSG_RESULT(${RTEMS_BSP})
-
+
+ test x"${with_project_root}" = x && with_project_root=".";
+ case x${with_project_root} in
+ x[[\\/]]* | x?:[[\\/]]* ) # absolute dir
+ PROJECT_ROOT="${with_project_root}"
+ ;;
+ x* ) # relative dir
+ PROJECT_ROOT="\$(top_builddir)${cpukit_topdir}${with_project_root}"
+ ;;
+ esac
+
+ PROJECT_ROOT="${PROJECT_ROOT}/$RTEMS_BSP"
+ AC_SUBST([PROJECT_INCLUDE],["${PROJECT_ROOT}/lib/include"])
+ AC_SUBST([PROJECT_LIB],["${PROJECT_ROOT}/lib"])
+
includedir="\${exec_prefix}/${RTEMS_BSP}/lib/include"
libdir="\${exec_prefix}/${RTEMS_BSP}/lib"
+ ],[
+ AS_IF([test x"$multilib" = x"yes"],
+ [
+ AS_IF([test -n "$with_multisubdir"],
+ [MULTIBUILDTOP=`echo "/$with_multisubdir" | sed 's,/[[^\\/]]*,../,g'`])
+ AC_SUBST(MULTIBUILDTOP)
+
+ AS_IF([test -n "$with_multisubdir"],
+ [MULTISUBDIR="/$with_multisubdir"])
+ AC_SUBST(MULTISUBDIR)
+
+ PROJECT_ROOT="\$(top_builddir)${cpukit_topdir}../\$(MULTIBUILDTOP)"
+
+ AC_SUBST([PROJECT_INCLUDE],["${PROJECT_ROOT}lib/include"])
+ AC_SUBST([PROJECT_LIB],["${PROJECT_ROOT}lib\$(MULTISUBDIR)"])
- AC_SUBST([PROJECT_INCLUDE],["${PROJECT_ROOT}/$RTEMS_BSP/lib/include"])
- AC_SUBST([PROJECT_LIB],["${PROJECT_ROOT}/$RTEMS_BSP/lib"])
+ includedir="\${exec_prefix}/include"
+ libdir="${libdir}\$(MULTISUBDIR)"
+ ],[
+ PROJECT_ROOT="\$(top_builddir)${cpukit_topdir}"
+
+ AC_SUBST([PROJECT_INCLUDE],["${PROJECT_ROOT}lib/include"])
+ AC_SUBST([PROJECT_LIB],["${PROJECT_ROOT}lib\$(MULTISUBDIR)"])
+
+ includedir="\${exec_prefix}/include"
+ libdir="${libdir}\$(MULTISUBDIR)"
+ ])
])
AC_SUBST([project_libdir],["\$(libdir)"])
AC_SUBST([project_includedir],["\$(includedir)"])
+ AC_SUBST(PROJECT_ROOT)
+
AM_CONDITIONAL([MULTILIB],[test x"$multilib" = x"yes"])
])
diff --git a/cpukit/aclocal/rtems-top.m4 b/cpukit/aclocal/rtems-top.m4
index 0996ce73d0..e3ac18e21f 100644
--- a/cpukit/aclocal/rtems-top.m4
+++ b/cpukit/aclocal/rtems-top.m4
@@ -5,13 +5,13 @@ m4_define([RTEMS_API],[4.7])
dnl
dnl RTEMS_TOP($1)
dnl
-dnl $1 .. relative path from this configure.in to the toplevel configure.in
+dnl $1 .. relative path from this configure.ac to the toplevel configure.ac
dnl
AC_DEFUN([RTEMS_TOP],
[dnl
AC_REQUIRE([RTEMS_VERSIONING])
AC_REQUIRE([AM_SET_LEADING_DOT])
-AC_CONFIG_AUX_DIR([$1])
+AC_CONFIG_AUX_DIR([../$1])
AC_CHECK_PROGS(MAKE, gmake make)
AC_BEFORE([$0], [AM_INIT_AUTOMAKE])dnl
@@ -23,8 +23,6 @@ AC_SUBST(RTEMS_TOPdir)
## with_target_subdirs is handled implicitly by autoconf
test -n "$with_target_subdir" || with_target_subdir="."
-PROJECT_ROOT="${with_project_root}${RTEMS_TOPdir}/\$(MULTIBUILDTOP)\$(top_builddir)"
-
AC_MSG_CHECKING([for RTEMS Version])
AC_MSG_RESULT([_RTEMS_VERSION])