From: <man...@us...> - 2014-03-06 13:19:40
|
Revision: 3831 http://sourceforge.net/p/modplug/code/3831 Author: manxorist Date: 2014-03-06 13:19:32 +0000 (Thu, 06 Mar 2014) Log Message: ----------- [Fix] build: Mixed revision working copies result in svnversion returning a string that contains a ':'. This confuses the Makefile and would be rather tricky to escape, just replace it with a '-'. Modified Paths: -------------- trunk/OpenMPT/Makefile trunk/OpenMPT/common/svn_version_svnversion/svn_version.h Modified: trunk/OpenMPT/Makefile =================================================================== --- trunk/OpenMPT/Makefile 2014-03-06 13:02:11 UTC (rev 3830) +++ trunk/OpenMPT/Makefile 2014-03-06 13:19:32 UTC (rev 3831) @@ -361,7 +361,7 @@ SVN_INFO:=$(shell svn info . > /dev/null 2>&1 ; echo $$? ) ifeq ($(SVN_INFO),0) # in svn checkout -BUILD_SVNVERSION := $(shell svnversion -n . ) +BUILD_SVNVERSION := $(shell svnversion -n . | tr ':' '-' ) CPPFLAGS += -Icommon/svn_version_svnversion -D BUILD_SVNVERSION=\"$(BUILD_SVNVERSION)\" DIST_OPENMPT_VERSION:=r$(BUILD_SVNVERSION) DIST_LIBOPENMPT_VERSION:=$(LIBOPENMPT_VERSION_MAJOR).$(LIBOPENMPT_VERSION_MINOR).$(BUILD_SVNVERSION) Modified: trunk/OpenMPT/common/svn_version_svnversion/svn_version.h =================================================================== --- trunk/OpenMPT/common/svn_version_svnversion/svn_version.h 2014-03-06 13:02:11 UTC (rev 3830) +++ trunk/OpenMPT/common/svn_version_svnversion/svn_version.h 2014-03-06 13:19:32 UTC (rev 3831) @@ -44,6 +44,10 @@ { svnversion = svnversion.substr(svnversion.find(":") + 1); } + if(svnversion.find("-") != std::string::npos) + { + svnversion = svnversion.substr(svnversion.find("-") + 1); + } if(svnversion.find("M") != std::string::npos) { svnversion = svnversion.substr(0, svnversion.find("M")); @@ -73,6 +77,10 @@ { return true; } + if(svnversion.find("-") != std::string::npos) + { + return true; + } if(svnversion.find("S") != std::string::npos) { return true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |