ocarina/include/Sconscript

19 lines
379 B
Python

#!/usr/bin/python
import subprocess
Import("env")
version = str(env.Version)
if env.Debug == True:
version += "-debug"
try:
devnull = open("/dev/null", "w")
diff = subprocess.check_output("git diff $(git describe --abbrev=0)",
stderr=devnull, shell=True)
if diff != "":
version += "+"
except:
pass
env.Append( CCFLAGS = [ "-DCONFIG_VERSION='\"%s\"'" % version ] )