scons: relocate config.h and revision.h to build directory
This commit is contained in:
parent
69b9b01dc4
commit
d58589797b
1 changed files with 6 additions and 3 deletions
|
@ -269,7 +269,7 @@ def Warning(message):
|
|||
return False
|
||||
|
||||
from metasconf import init_metasconf
|
||||
configure_args = dict(custom_tests = init_metasconf(env, ["cplusplus", "python_devel", "sdl", "boost", "pango", "pkgconfig", "gettext", "lua"]), config_h = "config.h",
|
||||
configure_args = dict(custom_tests = init_metasconf(env, ["cplusplus", "python_devel", "sdl", "boost", "pango", "pkgconfig", "gettext", "lua"]), config_h = "$build_dir/config.h",
|
||||
log_file="$build_dir/config.log", conf_dir="$build_dir/sconf_temp")
|
||||
|
||||
env.MergeFlags(env["extra_flags_config"])
|
||||
|
@ -418,7 +418,10 @@ if not env['nls']:
|
|||
#
|
||||
|
||||
for env in [test_env, client_env, env]:
|
||||
env.Prepend(CPPPATH = ["#/", "#/src"])
|
||||
build_root="#/"
|
||||
if os.path.isabs(env["build_dir"]):
|
||||
build_root = ""
|
||||
env.Prepend(CPPPATH = [build_root + "$build_dir", "#/src"])
|
||||
|
||||
env.Append(CPPDEFINES = ["HAVE_CONFIG_H"])
|
||||
|
||||
|
@ -471,7 +474,7 @@ if not env['static_test']:
|
|||
test_env.Append(CPPDEFINES = "BOOST_TEST_DYN_LINK")
|
||||
|
||||
try:
|
||||
if call("utils/autorevision -t h > revision.h", shell=True) == 0:
|
||||
if call(env.subst("utils/autorevision -t h > $build_dir/revision.h"), shell=True) == 0:
|
||||
env["have_autorevision"] = True
|
||||
except:
|
||||
pass
|
||||
|
|
Loading…
Add table
Reference in a new issue