summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/makefile
diff options
context:
space:
mode:
authorSteven Noonan <steven@uplinklabs.net>2009-10-18 07:58:32 -0700
committerSteven Noonan <steven@uplinklabs.net>2009-10-18 07:59:54 -0700
commit2f656a0430f31656ebf81b6ee0690bc6ad04268f (patch)
tree3559bd9779bbbdb9dad67d315e1ade4c5008e805 /crawl-ref/source/makefile
parent4a5e72289713324ce6ff6000276bd81681b18666 (diff)
downloadcrawl-ref-2f656a0430f31656ebf81b6ee0690bc6ad04268f.tar.gz
crawl-ref-2f656a0430f31656ebf81b6ee0690bc6ad04268f.zip
versioning: remove SVN-specific revision data, add Git versioning
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
Diffstat (limited to 'crawl-ref/source/makefile')
-rw-r--r--crawl-ref/source/makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/crawl-ref/source/makefile b/crawl-ref/source/makefile
index 449980eb20..e9d5421bc0 100644
--- a/crawl-ref/source/makefile
+++ b/crawl-ref/source/makefile
@@ -495,6 +495,7 @@ ifndef V
QUIET_CXX = @echo ' ' CXX $@;
QUIET_PCH = @echo ' ' PCH $@;
QUIET_LINK = @echo ' ' LINK $@;
+ QUIET_GEN = @echo ' ' GEN $@;
QUIET_COPY = @echo ' ' COPY $@;
QUIET_DEPEND = @echo ' ' DEPEND $@;
export V
@@ -544,7 +545,7 @@ LIB += $(LIBLUA) $(LIBSQLITE)
GAME_DEPENDS := $(DESTTILEFILES) $(OBJECTS) $(EXTRA_OBJECTS) $(CONTRIB_DEPENDS)
SRC_PKG_BASE := stone_soup
-SRC_VERSION := $(shell egrep 'VER_NUM *".*"' version.h | cut -d'"' -f2)
+SRC_VERSION := $(shell git describe --tags --long)
PKG_SRC_DIR := $(SRC_PKG_BASE)-$(SRC_VERSION)-src
SRC_PKG_TAR := $(PKG_SRC_DIR).tbz2
SRC_PKG_ZIP := $(PKG_SRC_DIR).zip
@@ -590,6 +591,13 @@ ifneq ($(MAKECMDGOALS),distclean)
endif
endif
+.INTERMEDIATE: build.h
+
+build.h:
+ $(QUIET_GEN)util/gen_ver.pl $@
+
+version.cc: build.h
+
##########################################################################
# The level compiler
#