source: rtems/aclocal/rtems-top.m4 @ 5b53d97

4.104.114.84.95
Last change on this file since 5b53d97 was 372e4e2, checked in by Joel Sherrill <joel.sherrill@…>, on 09/13/00 at 13:08:11

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

  • aclocal/rtems-top.m4: Add ENDIF-hack.
  • automake/compile.am: Add include $(DEPENDS) + ENDIF-hack.
  • Property mode set to 100644
File size: 1.0 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
18AC_ARG_WITH(target-subdir,
19[  --with-target-subdir=DIR],
20TARGET_SUBDIR="$withval",
21TARGET_SUBDIR=".")
22
23RTEMS_TOPdir="$1";
24AC_SUBST(RTEMS_TOPdir)
25
26dnl Determine RTEMS Version string from the VERSION file
27dnl Hopefully, Joel never changes its format ;-
28AC_MSG_CHECKING([for RTEMS Version])
29if test -r "${srcdir}/${RTEMS_TOPdir}/VERSION"; then
30changequote(,)dnl
31RTEMS_VERSION=`grep 'RTEMS Version' ${srcdir}/${RTEMS_TOPdir}/VERSION | \
32sed -e 's%RTEMS[        ]*Version[      ]*\(.*\)[       ]*%\1%g'`
33changequote([,])dnl
34else
35AC_MSG_ERROR(Unable to find ${RTEMS_TOPdir}/VERSION)
36fi
37if test -z "$RTEMS_VERSION"; then
38AC_MSG_ERROR(Unable to determine version)
39fi
40AC_MSG_RESULT($RTEMS_VERSION)
41])dnl
Note: See TracBrowser for help on using the repository browser.