diff options
Diffstat (limited to 'src/make.configuration.deps')
-rw-r--r-- | src/make.configuration.deps | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/make.configuration.deps b/src/make.configuration.deps index dfb7d81..0f5c4c4 100644 --- a/src/make.configuration.deps +++ b/src/make.configuration.deps @@ -6,6 +6,11 @@ # Should we use gtar or tar? TAR := $(shell gtar --help > /dev/null 2> /dev/null && echo gtar || echo tar) +# Is this Gnu tar? If so, set this to 1, otherwise to 0 +# This is used to treat a exit code of 1 from gnu tar as non-fatal. This exit code +# indicates that files changed while reading, which can happen here because of changed +# atimes. +GNUTAR := $(shell $TAR --version 2>/dev/null | grep -q 'GNU tar' && echo "1" || echo "0") # Does tr support -C, or should we use -c instead? TR_C := $(shell tr -C 'a' 'b' < /dev/null > /dev/null 2> /dev/null && echo 'tr -C' || echo 'tr -c') @@ -122,7 +127,7 @@ $(TARBALL_DIR)/cactus-flesh-source.c: $(TARBALL_DIR)/cactus-flesh-source.tar.gz $(TARBALL_DIR)/cactus-flesh-source.tar.gz: $(TARBALL_DIR)/cactus-flesh-source.files cd $(CCTK_HOME) && \ - $(TAR) czf $@ -T $< + $(TAR) czf $@ -T $< || [ $[ $?/($GNUTAR+1) ] -eq 0 ] # This dependency means that the tarball for a thorn is only updated # if the thorn is actually recompiled. This does not catch changes to @@ -174,7 +179,7 @@ $(TARBALL_DIR)/cactus-thorn-source-%.c: $(TARBALL_DIR)/cactus-thorn-source-%.tar $(TARBALL_DIR)/cactus-thorn-source-%.tar.gz: $(TARBALL_DIR)/cactus-thorn-source-%.files cd $(CCTK_HOME) && \ - $(TAR) czf $@ -T $< + $(TAR) czf $@ -T $< || [ $[ $?/($GNUTAR+1) ] -eq 0 ] # This dependency means that the tarball for a thorn is only updated # if the thorn is actually recompiled. This does not catch changes to |