source: rtems/c/Makefile.in @ 5906ac5

4.104.114.84.9
Last change on this file since 5906ac5 was 5906ac5, checked in by Joel Sherrill <joel.sherrill@…>, on Mar 19, 1999 at 10:10:04 PM

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

This one once again changes the scheme to preinstall bsp_specs.

It moves generating PROJECT_ROOT/lib/bsp_specs to
libbsp/<cpu>/<bsp>/wrapup/Makefile.in.

I.e. it decentralizes generation of bsp_specs to a bsp-dependent
directory, because preinstalling bsp_specs in a centralized Makefile
like it has been done until now does not harmonize well with spliting
the toplevel configure script in cpu and bsp-dependent configure scripts
and automake.

First apply the patch (rtems-rc-19990318-0.diff) below, then run the
reorg-bsp_specs.sh script.

IMO, this one is comparatively harmless and eases automake support
significantly.

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