Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:

This patch removes generation of targopts.h from leaf.cfg and generates
    it in location at score/include/rtems/score instead.

    To achieve this:
        * all rules in other Makefile.ins which have accessed targopts.h have
          been removed.
        * c/Makefile.in has been modified to generate the directories before
          doing anything else. I.e. to ensure the directories exist before any
          preinstall rule fires (This part is a bit kludgy, but it seems to
          work.  Please check if the interaction with libhwapi still works).
This commit is contained in:
Joel Sherrill
1999-02-18 17:16:48 +00:00
parent 0c04c377bc
commit e4071cf64a
12 changed files with 60 additions and 69 deletions

View File

@@ -66,17 +66,11 @@ $(ARCH)/rtems-cpu.rel: $(OBJS)
# for include files, just use $(INSTALL) # for include files, just use $(INSTALL)
preinstall: $(ARCH) \ preinstall: $(ARCH) \
$(PROJECT_INCLUDE)/rtems/score/targopts.h \
${PROJECT_RELEASE}/lib/bsp_specs ${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_INCLUDE)/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
$(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp ${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@ $(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@

View File

@@ -67,17 +67,12 @@ 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) $(PROJECT_INCLUDE)/rtems/score/targopts.h \ install-headers: $(ARCH) \
${PROJECT_RELEASE}/lib/bsp_specs ${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_INCLUDE)/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
$(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp ${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@ $(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@

View File

@@ -64,17 +64,11 @@ all: ${ARCH} $(SRCS) preinstall $(OBJS) $(RELS)
install: all install: all
preinstall: $(ARCH) \ preinstall: $(ARCH) \
$(PROJECT_INCLUDE)/rtems/score/targopts.h \
${PROJECT_RELEASE}/lib/bsp_specs ${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_INCLUDE)/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
$(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp ${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@ $(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@

View File

@@ -63,17 +63,11 @@ all: ${ARCH} $(SRCS) preinstall $(OBJS) $(RELS)
install: all install: all
preinstall: $(ARCH) \ preinstall: $(ARCH) \
$(PROJECT_INCLUDE)/rtems/score/targopts.h \
${PROJECT_RELEASE}/lib/bsp_specs ${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_INCLUDE)/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
$(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp ${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@ $(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@

View File

@@ -59,17 +59,12 @@ $(ARCH)/rtems-cpu.rel: $(OBJS)
all: ${ARCH} $(SRCS) preinstall $(OBJS) $(RELS) all: ${ARCH} $(SRCS) preinstall $(OBJS) $(RELS)
preinstall: $(ARCH) $(PROJECT_INCLUDE)/rtems/score/targopts.h \ preinstall: $(ARCH) \
${PROJECT_RELEASE}/lib/bsp_specs ${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_INCLUDE)/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
$(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp ${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@ $(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@

View File

@@ -65,17 +65,12 @@ $(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) $(PROJECT_INCLUDE)/rtems/score/targopts.h \ preinstall: $(ARCH) \
${PROJECT_RELEASE}/lib/bsp_specs ${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_INCLUDE)/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
$(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp ${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@ $(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@

View File

@@ -66,17 +66,11 @@ install: all
# Real ports using the gnu tools will need to have bsp_specs!!! # Real ports using the gnu tools will need to have bsp_specs!!!
# ${PROJECT_RELEASE}/lib/bsp_specs # ${PROJECT_RELEASE}/lib/bsp_specs
preinstall: $(ARCH) \ preinstall: $(ARCH)
$(PROJECT_INCLUDE)/rtems/score/targopts.h
$(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_INCLUDE)/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
$(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
# Real ports using the gnu tools will need to have bsp_specs!!! # Real ports using the gnu tools will need to have bsp_specs!!!
#${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp #${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
# $(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@ # $(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@

View File

@@ -67,7 +67,6 @@ $(ARCH)/cpu_asm.o: irq_stub.s
install: all install: all
preinstall: $(ARCH) \ preinstall: $(ARCH) \
$(PROJECT_INCLUDE)/rtems/score/targopts.h \
${PROJECT_RELEASE}/lib/bsp_specs ${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
@@ -75,11 +74,6 @@ preinstall: $(ARCH) \
# 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_INCLUDE)/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
$(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp ${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@ $(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@

View File

@@ -70,17 +70,12 @@ $(ARCH)/rtems-cpu.rel: $(OBJS)
# for include files, just use $(INSTALL) # for include files, just use $(INSTALL)
install: all install: all
preinstall: $(ARCH) $(PROJECT_INCLUDE)/rtems/score/targopts.h \ preinstall: $(ARCH) \
${PROJECT_RELEASE}/lib/bsp_specs ${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_INCLUDE)/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
$(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp ${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@ $(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@

View File

@@ -58,17 +58,12 @@ $(ARCH)/rtems-cpu.rel: $(OBJS)
all: ${ARCH} $(SRCS) preinstall $(OBJS) $(RELS) all: ${ARCH} $(SRCS) preinstall $(OBJS) $(RELS)
preinstall: $(ARCH) $(PROJECT_INCLUDE)/rtems/score/targopts.h \ preinstall: $(ARCH) \
${PROJECT_RELEASE}/lib/bsp_specs ${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_INCLUDE)/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
$(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp ${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@ $(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@

View File

@@ -67,16 +67,10 @@ install: all
# Real ports using the gnu tools will need to have bsp_specs!!! # Real ports using the gnu tools will need to have bsp_specs!!!
# ${PROJECT_RELEASE}/lib/bsp_specs # ${PROJECT_RELEASE}/lib/bsp_specs
preinstall: $(ARCH) $(ARCH)/unixsize.h \ preinstall: $(ARCH) $(ARCH)/unixsize.h \
$(PROJECT_INCLUDE)/rtems/score/targopts.h \
$(PROJECT_RELEASE)/lib/bsp_specs $(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
$(PROJECT_INCLUDE)/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
$(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
# Real ports using the gnu tools will need to have bsp_specs!!! # Real ports using the gnu tools will need to have bsp_specs!!!
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp ${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@ $(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@

View File

@@ -17,7 +17,7 @@ H_PIECES= address apiext bitfield chain context copyrt coremsg coremutex \
coresem heap interr isr object \ coresem heap interr isr object \
priority stack states sysstate thread threadq \ priority stack states sysstate thread threadq \
tod tqdata userext watchdog wkspace tod tqdata userext watchdog wkspace
H_FILES=$(H_PIECES:%=$(srcdir)/%.h) H_FILES=$(H_PIECES:%=$(srcdir)/%.h) targopts.h
SRCS=$(H_FILES) SRCS=$(H_FILES)
@@ -31,8 +31,60 @@ include $(RTEMS_ROOT)/make/leaf.cfg
# 'make clobber' already includes 'make clean' # 'make clobber' already includes 'make clean'
# #
CLEAN_ADDITIONS += CLEAN_ADDITIONS += targopts.h
CLOBBER_ADDITIONS += CLOBBER_ADDITIONS +=
# Until RTEMS_CPU is removed from all the make configuration files,
# this will need to be here to transform hppa1.1 into hppa1_1 to
# make it a valid cpp symbol. At some point in the near future,
# targopts.h should not define RTEMS_CPU. As best I can tell,
# gcc cpp predefines eliminate the need for RTEMS_CPU_MODEL
# on some families but not on others. For example, the i386
# family does not give us enough information from the predefines.
RTEMS_CPU_DEFINED=$(subst .,_,$(RTEMS_CPU))
# make the target dependent options file
targopts.h:
@echo "/* target board dependent options file */" >$@
@echo "/* automatically generated -- DO NOT EDIT!! */" >>$@
@echo >>$@
@echo "#ifndef __TARGET_OPTIONS_h" >>$@
@echo "#define __TARGET_OPTIONS_h" >>$@
@echo >>$@
@echo "#ifdef $(RTEMS_CPU_DEFINED)" >>$@
@echo "#undef $(RTEMS_CPU_DEFINED)" >>$@
@echo "#endif" >>$@
@echo "#define $(RTEMS_CPU_DEFINED) 1" >>$@
@echo >>$@
@echo "#ifdef $(RTEMS_CPU_MODEL)" >>$@
@echo "#undef $(RTEMS_CPU_MODEL)" >>$@
@echo "#endif" >>$@
@echo "#define $(RTEMS_CPU_MODEL) 1" >>$@
@echo >>$@
@echo "#ifdef $(RTEMS_BSP)" >>$@
@echo "#undef $(RTEMS_BSP)" >>$@
@echo "#endif" >>$@
@echo "#define $(RTEMS_BSP) 1" >>$@
@echo >>$@
@$(make-target-options)
ifeq (${RTEMS_USE_MACROS},yes)
@echo "#define USE_MACROS 1" >>$@
else
@echo "#define USE_INLINES 1" >>$@
endif
ifeq ($(RTEMS_HAS_MULTIPROCESSING),yes)
@echo "#define RTEMS_MULTIPROCESSING 1" >>$@
endif
ifeq ($(RTEMS_HAS_POSIX_API),yes)
@echo "#define RTEMS_POSIX_API 1" >>$@
endif
ifeq ($(RTEMS_USE_NEWLIB),yes)
@echo "#define RTEMS_NEWLIB 1" >>$@
@echo "#define MALLOC_PROVIDED 1" >>$@
endif
@echo >>$@
@echo "#endif" >>$@
all: $(SRCS) all: $(SRCS)
$(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score $(INSTALL) -m 444 ${H_FILES} $(PROJECT_INCLUDE)/rtems/score