source: rtems/c/Makefile.in @ e53c4a3

4.104.114.84.95
Last change on this file since e53c4a3 was 04c308c, checked in by Joel Sherrill <joel.sherrill@…>, on 03/19/99 at 23:11:36

Incorporated automake I patch from Ralf Corsepius <corsepiu@…>:

This is the first real automake patch.

It adds automake support to c/build-tools and cleans up a few minor
issues.

I consider this to be a testing probe to examine problems with automake.
Therefore, this patch is just a more or less harmless replacement of the
former RTEMS Makefiles and I expect it not last for long. If you want to
give automake Makefiles a public try and if you want/need to learn about
problems with it, then it's about time for a new snapshot, IMO. I may
have screwed up something not directly related to automake, but I expect
very few (none to be precise) problems with automake. However, somebody
should at least try building on Cygwin. If you feel a bit more
adventureous, then I also can continue to submit more patches.

[FYI: I still have a couple of automake files laying around, but they
need some cleanup before being submitted as patches. Now, that I am just
into it, I'll perhaps submit another one tonight :-]

After applying this patch (patch -p1 -E <
<path-to>/rtems-rc-19990318-0), first run the "autogen" script from the
toplevel source directory, before committing to CVS. Be careful about
dependencies between Makefile.am and Makefile.ins when cutting tarballs
from CVS. Makefile.ins are required to be newer than Makefile.ams,
otherwise users would need to have automake, autoconf and perl. Some
people recommend to "touch" all Makefile.in after checkout from cvs (cf.
egcs/contrib/egcs_update).

ATTENTION:

  • This patch adds a number of new files.
  • remove aclocal/exeext.m4 and aclocal/cygwin.m4 from CVS, They are now covered by autoconf-2.13`s AC_EXEEXT.

Some features/side-effects which are probably interesting for you:
In a configured build-tree "cd c/build-tools", then try

  • "make RTEMS_BSP=<bsp> install"
  • "make RTEMS_BSP=<bsp> dist"
  • Property mode set to 100644
File size: 4.5 KB
Line 
1#
2#  $Id$
3#
4# top level directory for RTEMS build tree
5# This Makefile is *not* a good example of a directory Makefile.
6#
7
8@SET_MAKE@
9srcdir = @srcdir@
10top_srcdir = @top_srcdir@
11top_builddir = ..
12subdir = c
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@
28VPATH = @srcdir@
29
30include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
31include $(RTEMS_ROOT)/make/directory.cfg
32
33SUB_DIRS=build-tools src
34
35# We only make the install point for the networking header files if needed.
36LIBNETWORKING_yes_V = lib/include/networking lib/include/networking/sys \
37        lib/include/networking/machine lib/include/networking/rtems \
38        lib/include/networking/vm lib/include/networking/net \
39        lib/include/networking/netinet lib/include/networking/arpa \
40        lib/include/networking/nfs
41LIBNETWORKING = $(LIBNETWORKING_$(HAS_NETWORKING)_V)
42
43# We only make the rpc install point if networking is enabled.
44LIBRPC_yes_V = lib/include/rpc
45LIBRPC = $(LIBRPC_$(HAS_NETWORKING)_V)
46
47# We only make the rdbg install point if networking and rdbg is enabled.
48LIBRDBG_yes_yes_V = lib/include/rdbg
49LIBRDBG = $(LIBRDBG_$(HAS_NETWORKING)_$(HAS_RDBG)_V)
50
51# We only make the rtems++ install point if it is enabled.
52LIBRTEMSCPLUSPLUS_yes_V = lib/include/rtems++
53LIBRTEMSCPLUSPLUS = $(LIBRTEMSCPLUSPLUS_$(HAS_CPLUSPLUS)_V)
54
55# directories to be created in install point
56CREATE_DIRS = \
57    lib lib/include lib/include/sys lib/include/rtems \
58    lib/include/rtems/score lib/include/rtems/rtems lib/include/rtems/posix \
59    lib/include/libc lib/include/libc/sys \
60    lib/include/motorola lib/include/zilog \
61    lib/include/libchip \
62    $(LIBNETWORKING) \
63    $(LIBRPC) \
64    $(LIBRDBG) \
65    $(LIBRTEMSCPLUSPLUS) \
66    bin samples \
67    tests tests/screens tests/screens/sptests \
68    tests/screens/psxtests tests/screens/mptests \
69    tests/screens/mptests/node1 tests/screens/mptests/node2 \
70    build-tools update-tools
71
72BUILD_DIRS = ${CREATE_DIRS:%=$(PROJECT_ROOT)/$(RTEMS_BSP)/%}
73
74# Make all/install must include 'env'
75# if something is added to TARGET_VARIANTS, then account for it here
76make_src_makefiles: Makefile.in Makefile
77        -find . -name Makefile \
78            -exec grep -l "^preinstall" {} \; > make_src_makefiles.tmp
79        -grep tools make_src_makefiles.tmp > make_src_makefiles
80        -grep -v tools make_src_makefiles.tmp >> make_src_makefiles
81        -rm make_src_makefiles.tmp
82
83pre_install_src: env make_src_makefiles
84        cd build-tools/scripts; \
85         $(MAKE) RTEMS_BSP=${RTEMS_BSP} install-exec-local
86        @echo "Order of preinstall directories"
87        cat make_src_makefiles
88        @echo
89        CURRDIR=`pwd`; \
90        for i in `cat make_src_makefiles` ; do \
91                DIR=`dirname $$i`; \
92                cd $$DIR; \
93                $(MAKE) preinstall; \
94                cd $$CURRDIR; \
95        done
96all: pre_install_src env
97debug: pre_install_src env
98profile: pre_install_src env
99
100install: all install_files
101debug_install: env debug install_files
102profile_install: env profile install_files
103
104debug_all: debug
105profile_all: profile
106
107# top level clean/clobber will delete the install points
108clean_WRAPUP = $(MAKE) clean_wrapup
109clobber_WRAPUP = $(MAKE) clean_wrapup
110
111clean_wrapup: clean_tools clean_dirs clean_modules
112
113.PHONY: dirs clean_wrapup clean_dirs clean_tools clean_modules env install
114
115$(BUILD_DIRS):
116        $(RTEMS_ROOT)/mkinstalldirs $(BUILD_DIRS)
117        if test -d $(PROJECT_ROOT)/c/src/lib/libhwapi; then \
118                (cd $(PROJECT_ROOT)/c/src/lib/libhwapi ; $(MAKE) mkdirs) \
119        fi
120
121dirs: $(BUILD_DIRS)
122
123distclean: clobber
124
125clean_dirs:
126        $(RM) -r $(PROJECT_RELEASE)
127
128clean_tools:
129        cd build-tools; $(MAKE) clean
130
131$(PROJECT_ROOT)/$(RTEMS_BSP)/Makefile.inc: $(PROJECT_ROOT)/make/Templates/Makefile.inc
132        echo "RTEMS_BSP = $(RTEMS_BSP)" > $@
133        $(CAT) $< >> $@
134
135# NOTE: The wildcard on the install should pick up everything except
136#       the tests directory.  This significantly minimizes the install size.
137
138install_files: $(PROJECT_ROOT)/$(RTEMS_BSP)/Makefile.inc
139        @top_srcdir@/mkinstalldirs $(prefix)
140        -$(RM) -rf $(prefix)/$(RTEMS_BSP)
141        cd ../; tar cf - $(RTEMS_BSP)/[bilsuM]* | \
142                (cd $(prefix); tar xpBf - )
143        cd ../make; $(MAKE) RTEMS_BSP=$(RTEMS_BSP) install
144
145tests:
146        cd src/tests; $(MAKE) all
147
148debug_tests: debug
149        cd src/tests; $(MAKE) debug
150
151profile_tests: profile
152        cd src/tests; $(MAKE) profile
153
154env:    $(SRCS) dirs
155
156Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
157        cd $(top_builddir) \
158         && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
Note: See TracBrowser for help on using the repository browser.