forked from Imagelibrary/rtems
Part of the automake VI patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
> 3) rtems-rc-19990131-2.diff > > This patch removes generating bsp_specs from leaf.cfg and generates > bsp_specs from inside of c/Makefile instead. > > The motivation behind this patch is to avoid "polluting" Makefiles by > unneccessary rules from included Makefile-fragments (*.cfg-files) and > try to handle files by explicit rules in Makefiles instead (FYI: > automake-1.4 physically includes Makefile fragments at the time > automake is run, not at the time make is run as RTEMS Makefile.ins do > now) > > Nevertheless, this patch is rather uncritical, almost cosmetical - If > you don't like it, then dump it ;-, however I doubt that subsequent > patches will apply then ;-.
This commit is contained in:
@@ -64,6 +64,18 @@ CREATE_DIRS = \
|
|||||||
|
|
||||||
BUILD_DIRS = ${CREATE_DIRS:%=$(PROJECT_ROOT)/$(RTEMS_BSP)/%}
|
BUILD_DIRS = ${CREATE_DIRS:%=$(PROJECT_ROOT)/$(RTEMS_BSP)/%}
|
||||||
|
|
||||||
|
# bsp_specs should be installed by a bsp-specific configure script
|
||||||
|
BSP_SPECS = $(PROJECT_RELEASE)/lib/bsp_specs
|
||||||
|
ifeq ($(RTEMS_BSP),bare)
|
||||||
|
BSP_SPECS_DIR = $(RTEMS_ROOT)/c/src/lib/libbsp/$(RTEMS_BSP_FAMILY)
|
||||||
|
else
|
||||||
|
BSP_SPECS_DIR = $(RTEMS_ROOT)/c/src/lib/libbsp/$(RTEMS_CPU)/$(RTEMS_BSP_FAMILY)
|
||||||
|
endif
|
||||||
|
|
||||||
|
$(BSP_SPECS): $(BSP_SPECS_DIR)/bsp_specs
|
||||||
|
cp $< $@
|
||||||
|
chmod 444 $@
|
||||||
|
|
||||||
# Make all/install must include 'env'
|
# Make all/install must include 'env'
|
||||||
# if something is added to TARGET_VARIANTS, then account for it here
|
# if something is added to TARGET_VARIANTS, then account for it here
|
||||||
make_src_makefiles: Makefile.in Makefile
|
make_src_makefiles: Makefile.in Makefile
|
||||||
@@ -145,4 +157,5 @@ debug_tests: debug
|
|||||||
profile_tests: profile
|
profile_tests: profile
|
||||||
cd src/tests; $(MAKE) profile
|
cd src/tests; $(MAKE) profile
|
||||||
|
|
||||||
env: $(SRCS) dirs
|
env: $(SRCS) dirs $(BSP_SPECS)
|
||||||
|
|
||||||
|
|||||||
@@ -65,13 +65,8 @@ $(ARCH)/rtems-cpu.rel: $(OBJS)
|
|||||||
# Install the program(s), appending _g or _p as appropriate.
|
# Install the program(s), appending _g or _p as appropriate.
|
||||||
# for include files, just use $(INSTALL)
|
# for include files, just use $(INSTALL)
|
||||||
|
|
||||||
preinstall: $(ARCH) \
|
preinstall: $(ARCH)
|
||||||
${PROJECT_RELEASE}/lib/bsp_specs
|
|
||||||
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
|
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
|
||||||
# we will share the basic cpu file
|
# we will share the basic cpu file
|
||||||
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} $(PROJECT_INCLUDE)
|
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} $(PROJECT_INCLUDE)
|
||||||
|
|
||||||
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
|
|
||||||
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
|
|
||||||
|
|
||||||
# $(ARCH)/bsp_specs.tmp rule is in leaf.cfg
|
|
||||||
|
|||||||
@@ -67,13 +67,8 @@ all: ${ARCH} install-headers preinstall $(RELS)
|
|||||||
preinstall: $(ARCH) $(SRCS) $(ARCH)/offsets.h
|
preinstall: $(ARCH) $(SRCS) $(ARCH)/offsets.h
|
||||||
$(INSTALL) -m 444 $(ARCH)/offsets.h $(PROJECT_INCLUDE)/rtems/score
|
$(INSTALL) -m 444 $(ARCH)/offsets.h $(PROJECT_INCLUDE)/rtems/score
|
||||||
|
|
||||||
install-headers: $(ARCH) \
|
install-headers: $(ARCH)
|
||||||
${PROJECT_RELEASE}/lib/bsp_specs
|
|
||||||
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
|
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
|
||||||
# we will share the basic cpu file
|
# we will share the basic cpu file
|
||||||
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} $(PROJECT_INCLUDE)
|
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} $(PROJECT_INCLUDE)
|
||||||
|
|
||||||
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
|
|
||||||
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
|
|
||||||
|
|
||||||
# $(ARCH)/bsp_specs.tmp rule is in leaf.cfg
|
|
||||||
|
|||||||
@@ -63,13 +63,8 @@ all: ${ARCH} $(SRCS) preinstall $(OBJS) $(RELS)
|
|||||||
# for include files, just use $(INSTALL)
|
# for include files, just use $(INSTALL)
|
||||||
install: all
|
install: all
|
||||||
|
|
||||||
preinstall: $(ARCH) \
|
preinstall: $(ARCH)
|
||||||
${PROJECT_RELEASE}/lib/bsp_specs
|
|
||||||
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
|
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
|
||||||
# we will share the basic cpu file
|
# we will share the basic cpu file
|
||||||
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} $(PROJECT_INCLUDE)
|
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} $(PROJECT_INCLUDE)
|
||||||
|
|
||||||
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
|
|
||||||
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
|
|
||||||
|
|
||||||
# $(ARCH)/bsp_specs.tmp rule is in leaf.cfg
|
|
||||||
|
|||||||
@@ -62,13 +62,8 @@ all: ${ARCH} $(SRCS) preinstall $(OBJS) $(RELS)
|
|||||||
# for include files, just use $(INSTALL)
|
# for include files, just use $(INSTALL)
|
||||||
install: all
|
install: all
|
||||||
|
|
||||||
preinstall: $(ARCH) \
|
preinstall: $(ARCH)
|
||||||
${PROJECT_RELEASE}/lib/bsp_specs
|
|
||||||
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
|
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
|
||||||
# we will share the basic cpu file
|
# we will share the basic cpu file
|
||||||
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} $(PROJECT_INCLUDE)
|
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} $(PROJECT_INCLUDE)
|
||||||
|
|
||||||
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
|
|
||||||
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
|
|
||||||
|
|
||||||
# $(ARCH)/bsp_specs.tmp rule is in leaf.cfg
|
|
||||||
|
|||||||
@@ -59,13 +59,8 @@ $(ARCH)/rtems-cpu.rel: $(OBJS)
|
|||||||
|
|
||||||
all: ${ARCH} $(SRCS) preinstall $(OBJS) $(RELS)
|
all: ${ARCH} $(SRCS) preinstall $(OBJS) $(RELS)
|
||||||
|
|
||||||
preinstall: $(ARCH) \
|
preinstall: $(ARCH)
|
||||||
${PROJECT_RELEASE}/lib/bsp_specs
|
|
||||||
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
|
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
|
||||||
# we will share the basic cpu file
|
# we will share the basic cpu file
|
||||||
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} $(PROJECT_INCLUDE)
|
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} $(PROJECT_INCLUDE)
|
||||||
|
|
||||||
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
|
|
||||||
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
|
|
||||||
|
|
||||||
# $(ARCH)/bsp_specs.tmp rule is in leaf.cfg
|
|
||||||
|
|||||||
@@ -65,13 +65,8 @@ $(ARCH)/rtems-cpu.rel: $(OBJS)
|
|||||||
# Install the program(s), appending _g or _p as appropriate.
|
# Install the program(s), appending _g or _p as appropriate.
|
||||||
# for include files, just use $(INSTALL)
|
# for include files, just use $(INSTALL)
|
||||||
|
|
||||||
preinstall: $(ARCH) \
|
preinstall: $(ARCH)
|
||||||
${PROJECT_RELEASE}/lib/bsp_specs
|
|
||||||
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
|
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
|
||||||
# we will share the basic cpu file
|
# we will share the basic cpu file
|
||||||
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} $(PROJECT_INCLUDE)
|
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} $(PROJECT_INCLUDE)
|
||||||
|
|
||||||
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
|
|
||||||
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
|
|
||||||
|
|
||||||
# $(ARCH)/bsp_specs.tmp rule is in leaf.cfg
|
|
||||||
|
|||||||
@@ -64,15 +64,7 @@ $(ARCH)/rtems-cpu.rel: $(OBJS)
|
|||||||
# for include files, just use $(INSTALL)
|
# for include files, just use $(INSTALL)
|
||||||
install: all
|
install: all
|
||||||
|
|
||||||
# Real ports using the gnu tools will need to have bsp_specs!!!
|
|
||||||
# ${PROJECT_RELEASE}/lib/bsp_specs
|
|
||||||
preinstall: $(ARCH)
|
preinstall: $(ARCH)
|
||||||
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
|
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
|
||||||
# we will share the basic cpu file
|
# we will share the basic cpu file
|
||||||
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} $(PROJECT_INCLUDE)
|
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} $(PROJECT_INCLUDE)
|
||||||
|
|
||||||
# Real ports using the gnu tools will need to have bsp_specs!!!
|
|
||||||
#${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
|
|
||||||
# $(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
|
|
||||||
|
|
||||||
# $(ARCH)/bsp_specs.tmp rule is in leaf.cfg
|
|
||||||
|
|||||||
@@ -66,15 +66,10 @@ $(ARCH)/cpu_asm.o: irq_stub.s
|
|||||||
# for include files, just use $(INSTALL)
|
# for include files, just use $(INSTALL)
|
||||||
install: all
|
install: all
|
||||||
|
|
||||||
preinstall: $(ARCH) \
|
preinstall: $(ARCH)
|
||||||
${PROJECT_RELEASE}/lib/bsp_specs
|
|
||||||
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
|
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
|
||||||
# we will share the basic cpu file
|
# we will share the basic cpu file
|
||||||
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} $(PROJECT_INCLUDE)
|
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} $(PROJECT_INCLUDE)
|
||||||
# make a link in case we are not compiling in the source directory
|
# make a link in case we are not compiling in the source directory
|
||||||
#test -f irq_stub.s || $(LN) -s $(srcdir)/irq_stub.s irq_stub.s
|
#test -f irq_stub.s || $(LN) -s $(srcdir)/irq_stub.s irq_stub.s
|
||||||
|
|
||||||
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
|
|
||||||
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
|
|
||||||
|
|
||||||
# $(ARCH)/bsp_specs.tmp rule is in leaf.cfg
|
|
||||||
|
|||||||
@@ -70,13 +70,7 @@ $(ARCH)/rtems-cpu.rel: $(OBJS)
|
|||||||
# for include files, just use $(INSTALL)
|
# for include files, just use $(INSTALL)
|
||||||
install: all
|
install: all
|
||||||
|
|
||||||
preinstall: $(ARCH) \
|
preinstall: $(ARCH)
|
||||||
${PROJECT_RELEASE}/lib/bsp_specs
|
|
||||||
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
|
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
|
||||||
# we will share the basic cpu file
|
# we will share the basic cpu file
|
||||||
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} $(PROJECT_INCLUDE)
|
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} $(PROJECT_INCLUDE)
|
||||||
|
|
||||||
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
|
|
||||||
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
|
|
||||||
|
|
||||||
# $(ARCH)/bsp_specs.tmp rule is in leaf.cfg
|
|
||||||
|
|||||||
@@ -58,13 +58,8 @@ $(ARCH)/rtems-cpu.rel: $(OBJS)
|
|||||||
|
|
||||||
all: ${ARCH} $(SRCS) preinstall $(OBJS) $(RELS)
|
all: ${ARCH} $(SRCS) preinstall $(OBJS) $(RELS)
|
||||||
|
|
||||||
preinstall: $(ARCH) \
|
preinstall: $(ARCH)
|
||||||
${PROJECT_RELEASE}/lib/bsp_specs
|
|
||||||
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
|
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
|
||||||
# we will share the basic cpu file
|
# we will share the basic cpu file
|
||||||
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} $(PROJECT_INCLUDE)
|
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} $(PROJECT_INCLUDE)
|
||||||
|
|
||||||
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
|
|
||||||
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
|
|
||||||
|
|
||||||
# $(ARCH)/bsp_specs.tmp rule is in leaf.cfg
|
|
||||||
|
|||||||
@@ -64,15 +64,6 @@ all: ${ARCH} $(SRCS) $(ARCH)/unixsize.h preinstall $(RELS)
|
|||||||
# for include files, just use $(INSTALL)
|
# for include files, just use $(INSTALL)
|
||||||
install: all
|
install: all
|
||||||
|
|
||||||
# Real ports using the gnu tools will need to have bsp_specs!!!
|
preinstall: $(ARCH) $(ARCH)/unixsize.h
|
||||||
# ${PROJECT_RELEASE}/lib/bsp_specs
|
|
||||||
preinstall: $(ARCH) $(ARCH)/unixsize.h \
|
|
||||||
$(PROJECT_RELEASE)/lib/bsp_specs
|
|
||||||
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
|
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score
|
||||||
$(INSTALL) -m 444 ${ARCH}/unixsize.h $(PROJECT_INCLUDE)/rtems/score
|
$(INSTALL) -m 444 ${ARCH}/unixsize.h $(PROJECT_INCLUDE)/rtems/score
|
||||||
|
|
||||||
# Real ports using the gnu tools will need to have bsp_specs!!!
|
|
||||||
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
|
|
||||||
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
|
|
||||||
#
|
|
||||||
# $(ARCH)/bsp_specs.tmp rule is in leaf.cfg
|
|
||||||
|
|||||||
@@ -125,11 +125,3 @@ clobber: clean
|
|||||||
$(RM) .#*
|
$(RM) .#*
|
||||||
$(RM) -r $(CLOBBER_OS) $(CLOBBER_CC) $(CLOBBER_DEPEND)
|
$(RM) -r $(CLOBBER_OS) $(CLOBBER_CC) $(CLOBBER_DEPEND)
|
||||||
$(RM) -r $(CLOBBER_ADDITIONS) a.out
|
$(RM) -r $(CLOBBER_ADDITIONS) a.out
|
||||||
|
|
||||||
ifeq ($(RTEMS_BSP),bare)
|
|
||||||
$(ARCH)/bsp_specs.tmp: FORCE
|
|
||||||
cp $(RTEMS_ROOT)/c/src/lib/libbsp/$(RTEMS_BSP_FAMILY)/bsp_specs $@
|
|
||||||
else
|
|
||||||
$(ARCH)/bsp_specs.tmp: FORCE
|
|
||||||
cp $(RTEMS_ROOT)/c/src/lib/libbsp/$(RTEMS_CPU)/$(RTEMS_BSP_FAMILY)/bsp_specs $@
|
|
||||||
endif
|
|
||||||
|
|||||||
Reference in New Issue
Block a user