Made scons recipe regenerate revision.hpp only if svn revision changes.

This commit is contained in:
Sergey Popov 2008-05-09 16:01:58 +00:00
parent a75775048a
commit 8146f5b544
2 changed files with 3 additions and 4 deletions

View file

@ -403,8 +403,8 @@ def InstallFilteredHook(target, source, env):
command = command % ("50%", source, target)
if env["verbose"]:
print command
call(Split(command))
return None
call(Split(command))
return None
# Just copy non-images, and images if tinygui is off
if env["verbose"]:
print "cp %s %s" % (str(source), target)

View file

@ -273,12 +273,11 @@ test_env.Program("test", test_sources + [libwesnoth_core, libwesnoth],
if env["svnrev"] != "" and env["svnrev"] != "exported":
revision_define = "#define REVISION \"%s\"\n" % env["svnrev"]
r = env.Command("revision.hpp", [], Action(
env.Command("revision.hpp", Value(env["svnrev"]), Action(
lambda target, source, env: open(str(target[0]), "w").write(revision_define),
"Generating revision.hpp..."
))
env.Append(CPPDEFINES = 'HAVE_REVISION')
env.AlwaysBuild(r)
#
# File inventory, for archive makes abd analysis tools