From 1725608510eaaeb582d54560623b70e7228e2385 Mon Sep 17 00:00:00 2001 From: eschnett Date: Sat, 21 Jul 2012 10:46:01 +0000 Subject: Handle build errors: recompile when the previous build was interrupted git-svn-id: http://svn.cactuscode.org/arrangements/CactusUtils/Formaline/trunk@220 83718e91-0e4f-0410-abf4-91180603181f --- src/make.configuration.deps | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/make.configuration.deps b/src/make.configuration.deps index be81692..1dcdf85 100644 --- a/src/make.configuration.deps +++ b/src/make.configuration.deps @@ -119,9 +119,13 @@ $(TARBALL_DIR)/cactus-meta.c: $(TARBALL_DIR)/flesh-Cactus.c $(patsubst %,$(TARBA # Flesh ############################################################################### +# Note: Build first the source files %-????.c, then the source file +# $^, so that interruptions or build errors lead to a re-build $(TARBALL_DIR)/flesh-Cactus.o: $(TARBALL_DIR)/flesh-Cactus.c @echo "Creating Formaline tarball for the flesh" - cd $(TARBALL_DIR) && $(CC) $(CFLAGS) -c $^ $(^:%.c=%-????.c) + cd $(TARBALL_DIR) && \ + $(CC) $(CFLAGS) -c $(^:%.c=%-????.c) && \ + $(CC) $(CFLAGS) -c $^ $(TARBALL_DIR)/flesh-Cactus.c: $(TARBALL_DIR)/flesh-Cactus.tar.gz $(CCTK_HOME)/arrangements/CactusUtils/Formaline/src/util/VERSION $(RM) -f $(@:%.c=%-????.c) @@ -178,9 +182,13 @@ $(TARBALL_DIR)/flesh-Cactus.ccldeps: # Thorns ############################################################################### +# Note: Build first the source files %-????.c, then the source file +# $^, so that interruptions or build errors lead to a re-build $(TARBALL_DIR)/thorn-%.o: $(TARBALL_DIR)/thorn-%.c @echo "Creating Formaline tarball for thorn $*" - cd $(TARBALL_DIR) && $(CC) $(CFLAGS) -c $(patsubst $(TARBALL_DIR)/%, %, $^ $(^:%.c=%-????.c)) + cd $(TARBALL_DIR) && \ + $(CC) $(CFLAGS) -c $(patsubst $(TARBALL_DIR)/%, %, $(^:%.c=%-????.c)) && \ + $(CC) $(CFLAGS) -c $(patsubst $(TARBALL_DIR)/%, %, $^) $(TARBALL_DIR)/thorn-%.c: $(TARBALL_DIR)/thorn-%.tar.gz $(CCTK_HOME)/arrangements/CactusUtils/Formaline/src/util/VERSION cd $(TARBALL_DIR) && $(RM) -f $(@:$(TARBALL_DIR)/%.c=%-????.c) -- cgit v1.2.3