Files
rtems/make/Makefile.in
Joel Sherrill 8548fe0ae2 Part of the automake VI patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
> 5) rtems-rc-19990202-1.diff/reorg-install.sh
>
> reorg-install.sh fixes a Makefile variable name clash of RTEMS
> configuration files and automake/autoconf standards.
> Until now, RTEMS used $(INSTALL) for install-if-change. Automake and
> autoconf use $(INSTALL) for a bsd-compatible install. As
> install-if-change and bsd-install are not compatible, I renamed all
> references to install-if-changed to $(INSTALL_CHANGED) and used
> $(INSTALL) for bsd-install (==automake/autoconf standard).  When
> automake will be introduced install-if-change will probably be replaced
> by $(INSTALL) and therefore will slowly vanish. For the moment, this
> patch fixes a very nasty problem which prevents adding any automake file
> until now (There are still more).
1999-02-18 18:36:05 +00:00

100 lines
2.6 KiB
Makefile

#
# $Id$
#
# Not strictly necessary to pull in this stuff. But it helps with
# working with the templates and poking around.
#
@SET_MAKE@
srcdir = @srcdir@
VPATH = @srcdir@
RTEMS_ROOT = @top_srcdir@
PROJECT_ROOT = @PROJECT_ROOT@
INSTALL = @INSTALL@
include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
include $(RTEMS_ROOT)/make/leaf.cfg
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
# NOTE: No need to prepend $(srcdir) to file names,
# VPATH handles the paths for us.
# NOTE: Only the files really need get installed.
GENERIC_FILES := host.cfg target.cfg
MAKEFILES := README \
directory.cfg leaf.cfg \
lib.cfg main.cfg
# NOTE: Use the wildcard rule to install all custom files
# CUSTOM_FILES := $(wildcard $(srcdir)/custom/*.cfg)
# NOTE: This should be sufficient, but may fail for some BSPS:
# Get all custom files for the BSP family, they may depend on each other
#CUSTOM_FILES := custom/default.cfg $(patsubst %,custom/%.cfg, posix)
# This version of the rule is pretty ugly but I think it works ALL the time.
# + Figure out what this BSP.cfg includes
# + Make those files have the correct relative path.
# + Now fix $(RTEMS_HOST) to the real host name
CUSTOM_FILES := custom/default.cfg custom/$(RTEMS_BSP).cfg \
$(shell grep "^include.*make/custom" $(srcdir)/custom/$(RTEMS_BSP).cfg | \
sed -e 's/^.*make\///' | sed -e s/\\$$\(RTEMS_HOST\)/${RTEMS_HOST}/)
# NOTE: Use the wildcard rule to install all compiler files
# COMPILER_FILES := $(wildcard $(srcdir)/compilers/*.cfg)
COMPILER_FILES := $(CONFIG.$(TARGET_ARCH).CC) $(CONFIG.$(HOST_ARCH).CC)
# NOTE: Don't use a wildcard rule here, otherwise Templates/Makefile.inc
# will be installed, too
TEMPLATE_FILES := \
Templates/Makefile.dir \
Templates/Makefile.leaf \
Templates/Makefile.lib
get: retrieve
all:
$(prefix)/rtems:
@top_srcdir@/mkinstalldirs $@
install: $(prefix)/rtems \
$(prefix)/rtems/make \
$(prefix)/rtems/make/compilers \
$(prefix)/rtems/make/custom \
$(prefix)/rtems/make/Templates \
install_files
$(prefix)/rtems/make:
@top_srcdir@/mkinstalldirs $@
install_files:: $(GENERIC_FILES) $(MAKEFILES)
$(INSTALL) $(INSTDATAFLAGS) $^ \
$(prefix)/rtems/make
$(prefix)/rtems/make/compilers:
@top_srcdir@/mkinstalldirs $@
install_files:: $(COMPILER_FILES)
$(INSTALL) $(INSTDATAFLAGS) $^ \
$(prefix)/rtems/make/compilers
$(prefix)/rtems/make/custom:
@top_srcdir@/mkinstalldirs $@
install_files:: $(CUSTOM_FILES)
$(INSTALL) $(INSTDATAFLAGS) $^ \
$(prefix)/rtems/make/custom
$(prefix)/rtems/make/Templates:
@top_srcdir@/mkinstalldirs $@
install_files:: $(TEMPLATE_FILES)
$(INSTALL) $(INSTDATAFLAGS) $^ \
$(prefix)/rtems/make/Templates