mail[Wesnoth-commits] r29117 - /trunk/SConstruct


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by paniemin on August 30, 2008 - 17:29:
Author: suokko
Date: Sat Aug 30 17:29:06 2008
New Revision: 29117

URL: http://svn.gna.org/viewcvs/wesnoth?rev=29117&view=rev
Log:
Improved scons revision number generator when using git.

Modified:
    trunk/SConstruct

Modified: trunk/SConstruct
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/SConstruct?rev=29117&r1=29116&r2=29117&view=diff
==============================================================================
--- trunk/SConstruct (original)
+++ trunk/SConstruct Sat Aug 30 17:29:06 2008
@@ -302,7 +302,15 @@
 
 if os.path.exists('.git'):
     try:
-        env["svnrev"] = Popen(Split("git-svn find-rev HEAD"), 
stdout=PIPE).communicate()[0].rstrip("\n")
+        extra_version = "";
+        modified = "";
+        env["svnrev"] = "";
+        while env["svnrev"] == "" and extra_version != "^^^^^^^^^^^^^":
+            env["svnrev"] = Popen(Split("git-svn find-rev HEAD" + 
extra_version), stdout=PIPE).communicate()[0].rstrip("\n")
+            extra_version += "^"
+        if extra_version != "^":
+            env["svnrev"] += "M"
+        
     except:
         env["svnrev"] = ""
 else:
@@ -316,7 +324,7 @@
 
 binaries = Split("wesnoth wesnoth_editor wesnothd cutter exploder campaignd 
test")
 builds = {
-    "base"    : dict(CXXFLAGS = "-O2"),        # Don't build in subdirectory
+    "base"    : dict(CXXFLAGS = "-O2"),    # Don't build in subdirectory
     "debug"   : dict(CXXFLAGS = Split("-O0 -DDEBUG -ggdb3")),
     "release" : dict(CXXFLAGS = "-O2"),
     "profile" : dict(CXXFLAGS = "-pg", LINKFLAGS = "-pg")




Related Messages


Powered by MHonArc, Updated Sat Aug 30 17:41:36 2008