summaryrefslogtreecommitdiffstats
path: root/make/Makefile.in
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-01-20 19:30:30 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-01-20 19:30:30 +0000
commitbffb93879940c71c58d2c66410e1bd5e5e4dc979 (patch)
tree2b13eb892f6022cb62a7847f2d27fb44e5e313ae /make/Makefile.in
parent3294650cc34a7b1e6e669ecd4f95fba26ac4b97d (diff)
downloadrtems-bffb93879940c71c58d2c66410e1bd5e5e4dc979.tar.bz2
Removed PROJECT_HOME and CONFIG_DIR variables.
Diffstat (limited to 'make/Makefile.in')
-rw-r--r--make/Makefile.in85
1 files changed, 85 insertions, 0 deletions
diff --git a/make/Makefile.in b/make/Makefile.in
new file mode 100644
index 0000000000..16f78c6e5a
--- /dev/null
+++ b/make/Makefile.in
@@ -0,0 +1,85 @@
+#
+# $Id$
+#
+# Not strictly necessary to pull in this stuff. But it helps with
+# working with the templates and poking around.
+#
+
+@SET_MAKE@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+RTEMS_ROOT = @RTEMS_ROOT@
+PROJECT_ROOT = @PROJECT_ROOT@
+RTEMS_CUSTOM = $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
+
+include $(RTEMS_CUSTOM)
+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 eachother
+CUSTOM_FILES := custom/default.cfg $(patsubst %,custom/%.cfg,@RTEMS_BSP_LIST@)
+
+# 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:
+ -$(MKDIR) $(prefix)
+ -$(MKDIR) $(prefix)/rtems
+
+install: install_files $(prefix)/rtems
+
+install_files:: $(GENERIC_FILES) $(MAKEFILES)
+ @test -d $(prefix)/rtems/make || \
+ $(MKDIR) $(prefix)/rtems/make
+ for f in $^; do \
+ $(INSTALL) -m 644 "$$f" $(prefix)/rtems/make ;\
+ done
+
+install_files:: $(COMPILER_FILES)
+ @test -d $(prefix)/rtems/make/compilers || \
+ $(MKDIR) $(prefix)/rtems/make/compilers
+ for f in $^; do \
+ $(INSTALL) -m 644 "$$f" $(prefix)/rtems/make/compilers; \
+ done
+
+install_files:: $(CUSTOM_FILES)
+ @test -d $(prefix)/rtems/make/custom || \
+ $(MKDIR) $(prefix)/rtems/make/custom
+ for f in $^; do \
+ $(INSTALL) -m 644 "$$f" $(prefix)/rtems/make/custom; \
+ done
+
+install_files:: $(TEMPLATE_FILES)
+ @test -d $(prefix)/rtems/make/Templates || \
+ $(MKDIR) $(prefix)/rtems/make/Templates
+ for f in $^; do \
+ $(INSTALL) -m 644 "$$f" $(prefix)/rtems/make/Templates; \
+ done