diff options
author | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2002-01-03 22:41:57 +0000 |
---|---|---|
committer | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2002-01-03 22:41:57 +0000 |
commit | 525ba42f5fc8d63c64a2eb29c351217b869bfc98 (patch) | |
tree | 75746928be20bcd8c2f215519eb09088afaab792 /lib/make | |
parent | 33fb4c4ed07b114b173075407e50a3055c4a0788 (diff) |
Added make target '-build' to be used as
make <configuration>-build BUILDLIST=<space-separated list of thorns, without
arrangements prefixes>
This would only build all libs for BUILDLIST which must be a subset of the
thorns of the given configuration.
This new target is only experimental so far (and thus won't be documented).
It might be removed again if the functionality can be provided by the
default build rules.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2568 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/make')
-rw-r--r-- | lib/make/make.configuration | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/lib/make/make.configuration b/lib/make/make.configuration index 600bd183..cd7a93e1 100644 --- a/lib/make/make.configuration +++ b/lib/make/make.configuration @@ -2,14 +2,14 @@ # @file make.configuration # @date Sun Jan 17 22:15:23 1999 # @author Tom Goodale -# @desc +# @desc # Makes the CCTK executable for a particular configuration -# @enddesc +# @enddesc # @version $Id$ # @@*/ # Silence all but designated output -#.SILENT: +#.SILENT: # Some configuration variables CONFIG = $(TOP)/config-data @@ -46,7 +46,7 @@ LIBNAME_SUFFIX = .a endif endif -# Include the list of thorns to be built +# Include the list of thorns to be built # (Use -include to prevent warnings messages, as the file will be built if # it is missing .) # We don't want to include this file if doing something like a make clean @@ -61,6 +61,10 @@ ifeq ($(strip $(MAKECMDGOALS)), utils) -include $(CONFIG)/make.thornlist endif +ifeq ($(strip $(MAKECMDGOALS)), build) +-include $(CONFIG)/make.thornlist +endif + # Allow each thorn to include some global definitions ifneq ($(strip $(THORNS)),) -include $(THORNS:%=$(PACKAGE_DIR)/%/src/make.configuration.defn) @@ -95,7 +99,7 @@ $(EXEDIR)$(DIRSEP)$(EXE): $(CONFIG)/make.thornlist $(CONFIG)/cctki_version.h $(p @echo Creating $(EXE) in $(EXEDIR) from $(THORNS) $(CC) $(OPTIMISE_C) $(DEBUG_C) $(CFLAGS) $(CCOMPILEONLY)$(OPTIONSEP)$(TOP)$(DIRSEP)datestamp.o -I$(subst /,$(DIRSEP),$(CCTK_HOME)/src/include) -I$(CONFIG) $(subst /,$(DIRSEP),$(DATESTAMP)) if [ ! -d $(EXEDIR) ]; then $(MKDIR) $(MKDIRFLAGS) $(EXEDIR) ; fi - $(LD) $(CREATEEXE)$(OPTIONSEP)$(subst /,$(DIRSEP),$@) $(DEBUG_LD) $(LDFLAGS) $(EXTRAFLAGS) $(subst /,$(DIRSEP), $(TOP)/datestamp.o) $(CACTUSLIBLINKLINE) $(GENERAL_LIBRARIES) + $(LD) $(CREATEEXE)$(OPTIONSEP)$(subst /,$(DIRSEP),$@) $(DEBUG_LD) $(LDFLAGS) $(EXTRAFLAGS) $(subst /,$(DIRSEP), $(TOP)/datestamp.o) $(CACTUSLIBLINKLINE) $(GENERAL_LIBRARIES) @echo $(DIVIDER) # Version file @@ -116,7 +120,7 @@ $(CONFIG)/cctki_version.h: $(CCTK_HOME)/Makefile # src directory, and calls that rather than the default makefile # used for making thorn libraries. # -# Checks if the library is Cactus, in which case it uses the main source +# Checks if the library is Cactus, in which case it uses the main source # directory. $(CCTK_LIBDIR)/$(LIBNAME_PREFIX)%$(LIBNAME_SUFFIX): update @@ -146,7 +150,7 @@ include $(CONFIG)/make.config.deps $(CONFIG)/make.thornlist: $(TOP)/ThornList $(foreach lib, $(CCTK_HOME)/src $(THORNS:%=$(PACKAGE_DIR)/%), $(lib)/param.ccl $(lib)/interface.ccl $(lib)/schedule.ccl) $(CONFIG_THORNS:%=$(PACKAGE_DIR)/%/configuration.ccl) if [ -r $@ ] ; then echo Reconfiguring thorns ; rm $@ ;\ else echo Processing CCL files ; fi - $(PERL) -s $(CST) -config_dir=$(CONFIG) -cctk_home=$(CCTK_HOME) -top=$(TOP) $< + $(PERL) -s $(CST) -config_dir=$(CONFIG) -cctk_home=$(CCTK_HOME) -top=$(TOP) $< # Rule to build ThornList @@ -178,7 +182,7 @@ endif $(foreach lib, $(CCTK_HOME)/src $(THORNS:%=$(PACKAGE_DIR)/%), $(lib)/param.ccl $(lib)/interface.ccl $(lib)/schedule.ccl) $(CONFIG_THORNS:%=$(PACKAGE_DIR)/%/configuration.ccl): @echo "Missing file $@" @echo "Possibly from a thorn deleted from an arrangement" - @echo "Deleting make.thornlist" + @echo "Deleting make.thornlist" rm $(CONFIG)/make.thornlist @echo "Please try building again" exit 1 @@ -186,7 +190,7 @@ $(foreach lib, $(CCTK_HOME)/src $(THORNS:%=$(PACKAGE_DIR)/%), $(lib)/param.ccl $ # Phony targets. -.PHONY:update editthorns clean cleandeps cleanobjs realclean +.PHONY:update editthorns clean cleandeps cleanobjs realclean build # This phony target forces an update. update: @@ -232,9 +236,21 @@ realclean: rm -rf $(TOP)/scratch/* rm -f datestamp.o +# This target will build only a subset of the thorns for a given configuration. +# It also warns about thorns which don't exist. +THORN_BUILDLIST = $(filter $(ALLCACTUSLIBS), $(BUILDLIST)) +UNKNOWN_THORNS = $(filter-out $(ALLCACTUSLIBS), $(BUILDLIST)) + +build: $(CONFIG)/make.thornlist $(CONFIG)/cctki_version.h $(patsubst %, $(CCTK_LIBDIR)/$(LIBNAME_PREFIX)%$(LIBNAME_SUFFIX), $(THORN_BUILDLIST)) + if test "x$(UNKNOWN_THORNS)" != "x"; then \ + echo "WARNING: Don't know anything about '$(UNKNOWN_THORNS)' !"; \ + echo $(DIVIDER); \ + fi + + # This target allows thorns to add to $(ALL_UTILS) and then # have them built by a make utils -.PHONY: utils +.PHONY: utils utils: $(UTILS:%=$(UTIL_DIR)$(DIRSEP)%) |