diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-05-09 21:06:20 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-05-09 21:06:20 +0000 |
commit | 6039777605881b19b6bb3821a8e97d370336ed67 (patch) | |
tree | e0d3490c83615f55599daa5128393f2fc2847403 /lib/make/make.configuration | |
parent | aae8e43a8b249fc9ec8a51ec93af8e8ea6c7350a (diff) |
Changed so that make.subdir is used for building all user-supplied files.
Optimised a bit so libs and executable are only rebuilt if a source file/header
has really changed.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2158 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/make/make.configuration')
-rw-r--r-- | lib/make/make.configuration | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/lib/make/make.configuration b/lib/make/make.configuration index ab69f9d7..8ff1a120 100644 --- a/lib/make/make.configuration +++ b/lib/make/make.configuration @@ -74,16 +74,23 @@ endif UTIL_DIR=$(EXEDIR)$(DIRSEP)$(CONFIG_NAME) + +# Use a phony main target to make sure we print a nice ending message 8-) +.PHONY: main + +main: $(EXEDIR)$(DIRSEP)$(EXE) + @echo All done ! + @echo $(DIVIDER) + # Build the executable -$(EXEDIR)$(DIRSEP)$(EXE): $(CONFIG)/make.thornlist $(CONFIG)/cctki_version.h $(patsubst %,$(CCTK_LIBDIR)/$(LIBNAME_PREFIX)%$(LIBNAME_SUFFIX),$(notdir $(THORNS) $(CACTUSLIBS))) + +$(EXEDIR)$(DIRSEP)$(EXE): $(CONFIG)/make.thornlist $(CONFIG)/cctki_version.h $(patsubst %,$(CCTK_LIBDIR)/$(LIBNAME_PREFIX)%$(LIBNAME_SUFFIX),$(notdir $(THORNS) $(CACTUSLIBS))) @echo $(DIVIDER) @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) @echo $(DIVIDER) - @echo All done ! - @echo $(DIVIDER) # Version file $(CONFIG)/cctki_version.h: $(CCTK_HOME)/Makefile @@ -162,9 +169,21 @@ ifneq ($(strip $(THORNS)),) -include $(THORNS:%=$(PACKAGE_DIR)/%/src/make.configuration.deps) endif +# Catch the special case of a thorn being removed from the disk entirely. +$(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" + rm $(CONFIG)/make.thornlist + @echo "Please try building again" + exit 1 + + # Phony targets. .PHONY:update editthorns clean cleandeps cleanobjs realclean + +# This phony target forces an update. update: editthorns: @@ -186,14 +205,6 @@ editthorns: done @echo $(DIVIDER) -$(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" - rm $(CONFIG)/make.thornlist - @echo "Please try building again" - exit 1 - clean: @echo Deleting all object and dependency files in $(TOP) find $(TOP) \( -name '*.[od]' -o -name '*.a' \) -exec rm {} \; |