From 7fd858b3cd5cef1b933ad00003b93e67277e8599 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 12 Aug 2012 14:07:59 -0400 Subject: [PATCH] Do not allow stamp or $(VERSION_FILE) to succeed without gitcrement --- Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 47a8067..7771de0 100644 --- a/Makefile +++ b/Makefile @@ -53,17 +53,16 @@ compiled: # Builds the version file template. version: if [[ -f $(VERSION_FILE) ]]; then $(MAKE) $(VERSION_FILE); fi -$(VERSION_FILE): STAMP=$(shell date +%s) -$(VERSION_FILE): BUILD=$(shell gitcrement next) $(VERSION_FILE): + which gitcrement @echo "// This file is automatically generated." > $(VERSION_FILE) @echo >> $(VERSION_FILE) @echo "$$.namespace('$(VERSION_NAMESPACE)');" >> $(VERSION_FILE) @echo >> $(VERSION_FILE) echo "$(VERSION_NAMESPACE).MAJOR = $(VERSION_MAJOR);" >> $(VERSION_FILE) echo "$(VERSION_NAMESPACE).MINOR = $(VERSION_MINOR);" >> $(VERSION_FILE) - echo "$(VERSION_NAMESPACE).BUILD = $(BUILD);" >> $(VERSION_FILE) - echo "$(VERSION_NAMESPACE).STAMP = $(STAMP);" >> $(VERSION_FILE) + echo "$(VERSION_NAMESPACE).BUILD = $(shell gitcrement next);" >> $(VERSION_FILE) + echo "$(VERSION_NAMESPACE).STAMP = $(shell date +%s);" >> $(VERSION_FILE) # Copies the version template to the source and commits it. stamp: $(VERSION_FILE) -- 2.22.5