source: rtems/aclocal/rtems-top.m4 @ b50b3c8

4.104.114.84.95
Last change on this file since b50b3c8 was 1033e27, checked in by Joel Sherrill <joel.sherrill@…>, on 11/15/00 at 21:56:52

2000-11-13 Ralf Corsepius <corsepiu@…>

  • aclocal/canonical-host.m4: Abandon changequotes (autoconf-2.49b).
  • aclocal/check-newlib.m4: Let check message refer to RTEMS newlib.
  • aclocal/rtems-debug.m4: Fix formating and contents of the check's help string.
  • aclocal/rtems-top.m4: Remove AC_ARG_WITH(target-subdir).
  • Property mode set to 100644
File size: 1.4 KB
Line 
1dnl $Id$
2
3dnl
4dnl RTEMS_TOP($1)
5dnl
6dnl $1 .. relative path from this configure.in to the toplevel configure.in
7dnl
8AC_DEFUN(RTEMS_TOP,
9[dnl
10AC_CHECK_PROGS(MAKE, gmake make)
11AC_BEFORE([$0], [AC_CONFIG_AUX_DIR])dnl
12AC_BEFORE([$0], [AM_INIT_AUTOMAKE])dnl
13
14## HACK to allow gnu-make conditionals in automake-Makefiles.
15ENDIF=endif
16AC_SUBST(ENDIF)
17
18RTEMS_TOPdir="$1";
19AC_SUBST(RTEMS_TOPdir)
20
21## with_target_subdirs is handled implicitly by autoconf
22test -n "$with_target_subdir" || with_target_subdir="."
23
24if test "$with_target_subdir" = "." ; then
25# Native
26PROJECT_TOPdir=${RTEMS_TOPdir}/'$(top_builddir)'
27else
28# Cross
29dots=`echo $with_target_subdir|\
30sed -e 's%^\./%%' -e 's%[[^/]]$%&/%' -e 's%[[^/]]*/%../%g'`
31PROJECT_TOPdir=${dots}${RTEMS_TOPdir}/'$(top_builddir)'
32fi
33AC_SUBST(PROJECT_TOPdir)
34
35if test "$with_target_subdir" = "." ; then
36# Native
37PROJECT_ROOT=${RTEMS_TOPdir}/'$(top_builddir)';
38else
39# Cross
40PROJECT_ROOT=${RTEMS_TOPdir}/'$(top_builddir)'
41fi
42AC_SUBST(PROJECT_ROOT)
43
44dnl Determine RTEMS Version string from the VERSION file
45dnl Hopefully, Joel never changes its format ;-
46AC_MSG_CHECKING([for RTEMS Version])
47if test -r "${srcdir}/${RTEMS_TOPdir}/VERSION"; then
48RTEMS_VERSION=`grep 'RTEMS Version' ${srcdir}/${RTEMS_TOPdir}/VERSION | \
49sed -e 's%RTEMS[[       ]]*Version[[    ]]*\(.*\)[[     ]]*%\1%g'`
50else
51AC_MSG_ERROR(Unable to find ${RTEMS_TOPdir}/VERSION)
52fi
53if test -z "$RTEMS_VERSION"; then
54AC_MSG_ERROR(Unable to determine version)
55fi
56AC_MSG_RESULT($RTEMS_VERSION)
57])dnl
Note: See TracBrowser for help on using the repository browser.