source: rtems/macros/rtems-top.m4 @ 3174a7ed

4.104.114.84.9
Last change on this file since 3174a7ed was 3174a7ed, checked in by Joel Sherrill <joel.sherrill@…>, on Oct 31, 2000 at 9:20:00 PM

2000-10-30 Ralf Corsepius <corsepiu@…>

  • configure.in: New, Cygnus/GNU style configuration.
  • Makefile.am: Add macros/, reflect new configure.in, ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/macros
  • automake/compile.am: BSP_SPECS, remove RTEMS_CANONICALIZATION.
  • automake/lib.am: Remove RTEMS_CANONICALIZATION.
  • macros/tool-prefix.m4: Remove.
  • macros/target.m4: Remove RTEMS_CONFIG_SUBDIRS, RTEMS_OUTPUT_SUBDIRS.
  • macros/enable-rtemsbsp.m4: Add RTEMS_CONFIG_PER_BSP, add setting RTEMS_ROOT.
  • macros/i386-gas-code16.m4: Define NEW_GAS only for 16bit mode-
  • macros/multilib.m4: Various minor fixes.
  • macros/project-root.m4: Remove setting PROJECT_TOPdir, PROJECT_ROOT, RTEMS_ROOT.
  • macros/rtems-top.m4: Remove RTEMS_CANONICALIZATION, TARGET_SUBDIRS; Add with_target_subdirs, PROJECT_TOPdir, PROJECT_ROOT.
  • Property mode set to 100644
File size: 1.5 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
18# with_target_subdir
19AC_ARG_WITH(target-subdir,
20[  --with-target-subdir=DIR],
21with_target_subdir="$withval",
22with_target_subdir=".")
23
24RTEMS_TOPdir="$1";
25AC_SUBST(RTEMS_TOPdir)
26
27if test "$with_target_subdir" = "." ; then
28# Native
29PROJECT_TOPdir=${RTEMS_TOPdir}/'$(top_builddir)'
30else
31# Cross
32changequote(, )dnl
33dots=`echo $with_target_subdir|\
34sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
35changequote([, ])dnl
36PROJECT_TOPdir=${dots}${RTEMS_TOPdir}/'$(top_builddir)'
37fi
38AC_SUBST(PROJECT_TOPdir)
39
40if test "$with_target_subdir" = "." ; then
41# Native
42PROJECT_ROOT=${RTEMS_TOPdir}/'$(top_builddir)';
43else
44# Cross
45PROJECT_ROOT=${RTEMS_TOPdir}/'$(top_builddir)'
46fi
47AC_SUBST(PROJECT_ROOT)
48
49dnl Determine RTEMS Version string from the VERSION file
50dnl Hopefully, Joel never changes its format ;-
51AC_MSG_CHECKING([for RTEMS Version])
52if test -r "${srcdir}/${RTEMS_TOPdir}/VERSION"; then
53changequote(,)dnl
54RTEMS_VERSION=`grep 'RTEMS Version' ${srcdir}/${RTEMS_TOPdir}/VERSION | \
55sed -e 's%RTEMS[        ]*Version[      ]*\(.*\)[       ]*%\1%g'`
56changequote([,])dnl
57else
58AC_MSG_ERROR(Unable to find ${RTEMS_TOPdir}/VERSION)
59fi
60if test -z "$RTEMS_VERSION"; then
61AC_MSG_ERROR(Unable to determine version)
62fi
63AC_MSG_RESULT($RTEMS_VERSION)
64])dnl
Note: See TracBrowser for help on using the repository browser.