From e8c018a9d0fd0bbf48b1ad7e5ade7511c2db5f04 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Thu, 19 Mar 2009 19:42:22 +0000 Subject: Use the current SVN revision as a default when distributing a snapshot sources svn-id: r39533 --- Makefile.common | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Makefile.common') 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) -- cgit v1.2.3