source: rtems/Makefile.in @ 9b8baa1

4.104.114.84.95
Last change on this file since 9b8baa1 was d8ff793, checked in by Joel Sherrill <joel.sherrill@…>, on 03/19/99 at 22:27:02

Towards automake XI patch from Ralf Corsepius <corsepiu@…>:

This patch is the most scary of all proposals I've been mailing to you
this week until now.

It consists of 3 parts:

  1. a patch
  2. a perl script (acpolish)
  3. a shell script wrapper to invoke the perl-script.

The perl-script reads in each Makefile.in and modifies them
("polishes/beautifies" them :-).

These modifications are not easy to describe:

Basically, it hard-codes some automake Makefile-variables and rules into
RTEMS autoconf-Makefile.ins (Note: autoconf vs. automake!!) and converts
some settings/variables to configure scripts' requirements (Yes,
plural).

E.g. it adds the automake standard variables $top_builddir and $subdir,
adds dependency rules for automatic re-generation of Makefiles from
Makefile.in, adds support variables for relative paths to multiple
configure scripts etc.

The patch is a one-line patch to enable the support of the new features
added by acpolish.

The shell script is a wrapper which pokes around inside of the source
tree for Makefile.ins and invokes acpolish on all autoconf-Makefile.ins.

acpolish is designed to be able to run several times on the same
Makefile.in and may once become a more general tool to convert RTEMS
Makefile.in to automake. Therefore, I'd like to keep it inside of source
tree. (e.g. as contrib/acpolish or c/update-tools/acpolish). However, it
doesn't make sense to export it outside of RTEMS.

To apply this:

cd <source-tree>
patch -p1 -E < <path-to-patch>/rtems-rc-19990318-1.diff
tar xzvf <path-to>/rtems-rc-polish.tar.gz
./rtems-polish.sh
./autogen

Note: The path contrib/acpolish is hard-coded into rtems-polish.sh, if
you decide to put it in an alternative place, please modify
rtems-polish.sh to reflect this change.

Later:
cvs rm make/rtems.cfg (It isn't used anymore)
cvs add contrib
cvs add contrib/acpolish
cvs commit

I've tested this intensively, but naturally I can't exclude bugs.

Ralf.

PS.: Most probably, this is the last "Towards automake" patch. The next
one probably will be a real automake patch.

  • Property mode set to 100644
File size: 1.9 KB
Line 
1#
2# top level directory for RTEMS build tree
3#
4# Modified by Jiri to implement autoconf and cygnus one-tree build
5#
6#  $Id$
7#
8
9@SET_MAKE@
10srcdir = @srcdir@
11top_srcdir = @top_srcdir@
12top_builddir = .
13
14INSTALL = @INSTALL@
15
16RTEMS_ROOT = $(top_srcdir)/@RTEMS_TOPdir@
17PROJECT_ROOT = @PROJECT_ROOT@
18
19prefix = @prefix@
20exec_prefix = @exec_prefix@
21bindir = @bindir@
22libdir = @libdir@
23includedir = @includedir@
24target = @target@
25manext = 1
26mandir = @mandir@/man$(manext)
27program_prefix = @program_prefix@
28
29export bindir
30
31VPATH=@srcdir@
32
33ifeq ($(RTEMS_BSP),)
34  RTEMS_BSP = @RTEMS_BSP_LIST@
35endif
36
37include $(RTEMS_ROOT)/make/main.cfg
38
39MTARGETS = pre_install_src all install $(TARGET_VARIANTS) $(TARGET_VARIANTS:%=%_all) \
40  $(TARGET_VARIANTS:%=%_install) $(TARGET_VARIANTS:%=%_tests) \
41  clean_wrapup distclean clean_dirs clean_tools tests clean depend
42
43EXIT_CMD = exit 1
44
45# Don't pass flags from previous make - especially NOT CFLAGS 
46# NOTE: Previous versions overrode MAKEFLAGS, but this also disables
47# a lot of useful features
48# override MAKEFLAGS=
49
50$(MTARGETS):
51        BASEDIR=`pwd`; \
52        for bsp in $(RTEMS_BSP) xxx; \
53        do if [ $$bsp != xxx ] ; then  \
54            cd $$BASEDIR; \
55            cmd="cd c; $(MAKE) RTEMS_BSP=$$bsp $(FLAGS_TO_PASS) \
56            $@" ; \
57            eval $$cmd || $(EXIT_CMD); \
58        fi; done;
59
60## Configuration stuff
61
62ACLOCAL = aclocal -I aclocal
63AUTOCONF = autoconf
64
65ACLOCAL_FILES := $(wildcard $(srcdir)/aclocal/*.m4)
66ACLOCAL_M4 = aclocal.m4
67
68$(ACLOCAL_M4): configure.in $(ACLOCAL_FILES)
69        -cd $(RTEMS_ROOT) && $(ACLOCAL)
70
71config.status: $(RTEMS_ROOT)/configure
72        $(SHELL) ./config.status --recheck
73
74$(RTEMS_ROOT)/configure: $(RTEMS_ROOT)/configure.in $(ACLOCAL_M4)
75        -cd $(RTEMS_ROOT) && $(AUTOCONF)
76
77.PRECIOUS: $(ACLOCAL_M4) configure Makefile config.status
78
79Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
80        cd $(top_builddir) \
81         && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
Note: See TracBrowser for help on using the repository browser.