aboutsummaryrefslogtreecommitdiff
path: root/Makefile.common
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.common')
-rw-r--r--Makefile.common10
1 files changed, 10 insertions, 0 deletions
diff --git a/Makefile.common b/Makefile.common
index d189838c23..1d19f32a62 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -166,8 +166,12 @@ $(VERSION_FILES): %: %.in
######################################################################
ifeq ($(VER_EXTRA),svn)
+ifeq ($(origin VER_SVNREV), undefined)
DISTVERSION = $(shell date '+%Y-%m-%d')
else
+DISTVERSION = svn$(VER_SVNREV)
+endif
+else
DISTVERSION = $(VERSION)
endif
@@ -179,6 +183,12 @@ $(VERFILE): $(srcdir)/base/internal_version.h
@$(RM_REC) $(DISTDIR)
@$(MKDIR) $(DISTDIR)
svn export $(SVNROOT) $(DISTDIR)/$(DISTNAME)
+ifneq ($(origin VER_SVNREV), undefined)
+ @# Use the current SVN revision as a default for the snapshot sources
+ @svn cat $(SVNROOT)/base/internal_version.h | sed -e \
+ "s/^#define SCUMMVM_SVN_REVISION$$/#define SCUMMVM_SVN_REVISION \"$(VER_SVNREV)\"/g" \
+ > $(VERFILE)
+endif
$(DISTDIR)/$(DISTNAME).tar.gz: $(VERFILE)
cd $(DISTDIR); tar zcf $(DISTNAME).tar.gz $(DISTNAME)