Author: esr
Date: Thu Mar 27 11:13:00 2008
New Revision: 25182
URL: http://svn.gna.org/viewcvs/wesnoth?rev=25182&view=rev
Log:
Corrected recipe for making revision.hpp.
Modified:
trunk/SConstruct
Modified: trunk/SConstruct
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/SConstruct?rev=25182&r1=25181&r2=25182&view=diff
==============================================================================
--- trunk/SConstruct (original)
+++ trunk/SConstruct Thu Mar 27 11:13:00 2008
@@ -454,10 +454,10 @@
LIBPATH = [".", "/lib", "/usr/lib"])
# FIXME: Currently this will only work under Linux
-svnrev = commands.getoutput("svnversion -n . 2>/dev/null")
+env["svnrev"] = commands.getoutput("svnversion -n . 2>/dev/null")
env.Depends('src/game_config.o', 'src/revision.hpp')
-r = env.Command("revision.h", [],
- 'echo "#define REVISION \"%s\"" >src/revision.h' % svnrev)
+r = env.Command("src/revision.hpp", [],
+ lambda target, source, env: open(str(target[0]),
"w").write("#define REVISION \"%s\"\n" % env["svnrev"]))
env.AlwaysBuild(r)
#
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits