source: rtems/make/Makefile.in @ cc8a388a

4.104.114.84.95
Last change on this file since cc8a388a was 55258b4, checked in by Joel Sherrill <joel.sherrill@…>, on Mar 31, 1998 at 4:52:32 PM

Fixed CUSTOM_FILES rule so it properly picked up files included from
make/custom files.

  • Property mode set to 100644
File size: 2.6 KB
Line 
1#
2#  $Id$
3#
4# Not strictly necessary to pull in this stuff.  But it helps with
5#  working with the templates and poking around.
6#
7
8@SET_MAKE@
9srcdir = @srcdir@
10VPATH = @srcdir@
11RTEMS_ROOT = @top_srcdir@
12PROJECT_ROOT = @PROJECT_ROOT@
13
14include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
15include $(RTEMS_ROOT)/make/leaf.cfg
16
17CLEAN_ADDITIONS +=
18CLOBBER_ADDITIONS +=
19
20# NOTE: No need to prepend $(srcdir) to file names,
21#       VPATH handles the paths for us.
22# NOTE: Only the files really need get installed.
23
24GENERIC_FILES := host.cfg target.cfg
25
26MAKEFILES := README \
27        directory.cfg leaf.cfg \
28        lib.cfg main.cfg
29
30# NOTE: Use the wildcard rule to install all custom files
31# CUSTOM_FILES := $(wildcard $(srcdir)/custom/*.cfg)
32
33# NOTE: This should be sufficient, but may fail for some BSPS:
34#       Get all custom files for the BSP family, they may depend on each other
35#CUSTOM_FILES := custom/default.cfg $(patsubst %,custom/%.cfg, posix)
36
37#  This version of the rule is pretty ugly but I think it works ALL the time.
38#      + Figure out what this BSP.cfg includes
39#      + Make those files have the correct relative path.
40#      + Now fix $(RTEMS_HOST) to the real host name
41CUSTOM_FILES := custom/default.cfg custom/$(RTEMS_BSP).cfg \
42   $(shell grep "^include.*make/custom" $(srcdir)/custom/$(RTEMS_BSP).cfg | \
43    sed -e 's/^.*make\///' | sed -e s/\\$$\(RTEMS_HOST\)/${RTEMS_HOST}/)
44
45# NOTE: Use the wildcard rule to install all compiler files
46# COMPILER_FILES := $(wildcard $(srcdir)/compilers/*.cfg)
47COMPILER_FILES := $(CONFIG.$(TARGET_ARCH).CC) $(CONFIG.$(HOST_ARCH).CC)
48
49# NOTE: Don't use a wildcard rule here, otherwise Templates/Makefile.inc
50#       will be installed, too
51TEMPLATE_FILES := \
52        Templates/Makefile.dir \
53        Templates/Makefile.leaf \
54        Templates/Makefile.lib
55
56get: retrieve
57
58all:
59
60$(prefix)/rtems:
61        -$(MKDIR) $(prefix)
62        -$(MKDIR) $(prefix)/rtems
63
64install: install_files $(prefix)/rtems
65
66install_files:: $(GENERIC_FILES) $(MAKEFILES)
67        @test -d $(prefix)/rtems/make || \
68                $(MKDIR) $(prefix)/rtems/make
69        for f in $^; do \
70        $(INSTALL) -m 644 "$$f" $(prefix)/rtems/make ;\
71        done
72
73install_files:: $(COMPILER_FILES)
74        @test -d $(prefix)/rtems/make/compilers || \
75                $(MKDIR) $(prefix)/rtems/make/compilers
76        for f in $^; do \
77        $(INSTALL) -m 644 "$$f" $(prefix)/rtems/make/compilers; \
78        done
79
80install_files:: $(CUSTOM_FILES)
81        @test -d $(prefix)/rtems/make/custom || \
82                $(MKDIR) $(prefix)/rtems/make/custom
83        for f in $^; do \
84        $(INSTALL) -m 644 "$$f" $(prefix)/rtems/make/custom; \
85        done
86
87install_files:: $(TEMPLATE_FILES)
88        @test -d $(prefix)/rtems/make/Templates || \
89                $(MKDIR) $(prefix)/rtems/make/Templates
90        for f in $^; do \
91        $(INSTALL) -m 644 "$$f" $(prefix)/rtems/make/Templates; \
92        done
Note: See TracBrowser for help on using the repository browser.