diff options
author | dhewg | 2011-02-12 18:54:19 +0100 |
---|---|---|
committer | dhewg | 2011-02-12 19:03:36 +0100 |
commit | d794bfc4fa94acb994460dc687da408f65bbf977 (patch) | |
tree | 7f142e7808a5541546cd9bf3253cde3ed729a309 /Makefile.common | |
parent | c04682b3ae0b2bdfc0aec849ecc9a005ffda9c93 (diff) | |
download | scummvm-rg350-d794bfc4fa94acb994460dc687da408f65bbf977.tar.gz scummvm-rg350-d794bfc4fa94acb994460dc687da408f65bbf977.tar.bz2 scummvm-rg350-d794bfc4fa94acb994460dc687da408f65bbf977.zip |
GIT: use git for describing the version.
Diffstat (limited to 'Makefile.common')
-rw-r--r-- | Makefile.common | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Makefile.common b/Makefile.common index 1cb2936efe..9b5a327f72 100644 --- a/Makefile.common +++ b/Makefile.common @@ -163,17 +163,17 @@ VER_EXTRA = $(shell echo $(VERSION) | cut -d. -f 3 | cut -c2-) ###################################################################### -# Get Subversion's working copy information +# Get git's working copy information ###################################################################### -ifneq ($(shell svn info $(srcdir) 1>/dev/null 2>&1 || echo "error"),error) -SVNROOT := $(srcdir) +ifneq ($(shell cd $(srcdir); git rev-parse --verify HEAD 1>/dev/null 2>&1 || echo "error"),error) +GITROOT := $(srcdir) ifeq ($(origin VER_REV), undefined) # Get the working copy base revision -VER_REV := $(shell LANG=C svn info $(SVNROOT) | grep "^Revision" | cut -d ' ' -f 2) +VER_REV := $(shell cd $(srcdir); git describe --match desc/\* --dirty | cut -d '-' -f 2-) endif else -SVNROOT := https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/ +GITROOT := git://github.com/scummvm/scummvm.git endif # Define the Subversion revision if available, either autodetected or @@ -186,11 +186,11 @@ endif # Distribution settings ###################################################################### -ifeq ($(VER_EXTRA),svn) +ifeq ($(VER_EXTRA),git) ifeq ($(origin VER_REV), undefined) DISTVERSION = $(shell date '+%Y-%m-%d') else -DISTVERSION = svn$(VER_REV) +DISTVERSION = git$(VER_REV) endif else DISTVERSION = $(VERSION) @@ -200,6 +200,7 @@ DISTNAME := scummvm-$(DISTVERSION) DISTDIR := dist VERFILE := $(DISTDIR)/$(DISTNAME)/base/internal_version.h +# TODO git via $(GITROOT) $(VERFILE): $(srcdir)/base/internal_version.h @$(RM_REC) $(DISTDIR) @$(MKDIR) $(DISTDIR) |