aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstrangerke2011-02-12 19:35:19 +0100
committerstrangerke2011-02-12 19:35:19 +0100
commitf2e5b126cf1b64e547998606cc0d24bc55085f5e (patch)
tree0cf5c3cd140690820747aa8a716176bea84ca932
parent1036979de3049a95dddacc6202483cd563bfd6fb (diff)
parentdfe62d6ec40a4650c6bc6f881542ea47611f47e4 (diff)
downloadscummvm-rg350-f2e5b126cf1b64e547998606cc0d24bc55085f5e.tar.gz
scummvm-rg350-f2e5b126cf1b64e547998606cc0d24bc55085f5e.tar.bz2
scummvm-rg350-f2e5b126cf1b64e547998606cc0d24bc55085f5e.zip
Merge branch 'master' of github.com:scummvm/scummvm
-rw-r--r--Makefile.common17
-rw-r--r--backends/platform/dc/dreamcast.mk4
-rw-r--r--base/internal_version.h2
3 files changed, 13 insertions, 10 deletions
diff --git a/Makefile.common b/Makefile.common
index 1cb2936efe..2413fa572b 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -163,17 +163,19 @@ 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)
+# Are there uncommitted changes? (describe --dirty is only available since 1.6.6)
+VER_DIRTY := $(shell cd $(srcdir); git update-index --refresh --unmerged 1>/dev/null 2>&1; git diff-index --quiet HEAD || echo "-dirty")
# 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/\* | cut -d '-' -f 2-)$(VER_DIRTY)
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 +188,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 +202,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)
diff --git a/backends/platform/dc/dreamcast.mk b/backends/platform/dc/dreamcast.mk
index 5da966cf30..d53af90585 100644
--- a/backends/platform/dc/dreamcast.mk
+++ b/backends/platform/dc/dreamcast.mk
@@ -28,8 +28,8 @@ IP.BIN : ip.txt
makeip $< $@
ip.txt : $(srcdir)/backends/platform/dc/ip.txt.in
- if [ x"$(VER_EXTRA)" = xsvn ]; then \
- if [ -z "$(VER_REV)" ]; then ver="SVN"; else ver="r$(VER_REV)"; fi; \
+ if [ x"$(VER_EXTRA)" = xgit ]; then \
+ if [ -z "$(VER_REV)" ]; then ver="GIT"; else ver="r$(VER_REV)"; fi; \
else ver="V$(VERSION)"; fi; \
if expr "$$ver" : V...... >/dev/null; then \
ver="V$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH)"; fi; \
diff --git a/base/internal_version.h b/base/internal_version.h
index 55903d24bc..fc7b5350f5 100644
--- a/base/internal_version.h
+++ b/base/internal_version.h
@@ -10,4 +10,4 @@
#define SCUMMVM_REVISION
#endif
-#define SCUMMVM_VERSION "1.3.0svn" SCUMMVM_REVISION
+#define SCUMMVM_VERSION "1.3.0git" SCUMMVM_REVISION