summaryrefslogtreecommitdiff
path: root/lib/make/make.configuration
diff options
context:
space:
mode:
Diffstat (limited to 'lib/make/make.configuration')
-rw-r--r--lib/make/make.configuration33
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 {} \;