Made scons create binaries right in working copy root

instead of creating them in variant dir and then hardlinking them there.
This commit is contained in:
Sergey Popov 2009-02-13 00:24:44 +00:00
parent b8da4ada45
commit 85cc3202ce
2 changed files with 6 additions and 7 deletions

View file

@ -17,6 +17,8 @@ from os import access, F_OK
for dir in ["release", "debug", "profile"]:
if glob(os.path.join("build", dir, "*.cpp")):
shutil.rmtree(os.path.join("build", dir), True)
for base_file in glob("src/*-base"):
os.remove(base_file)
SConsignFile("build/sconsign.dblite")
@ -382,8 +384,8 @@ if build == "base":
else:
build_dir = os.path.join("build", build)
if build == "release" : build_suffix = "" + env["PROGSUFFIX"]
else : build_suffix = "-" + build + env["PROGSUFFIX"]
if build == "release" : build_suffix = ""
else : build_suffix = "-" + build
Export("build_suffix")
SConscript("src/SConscript", build_dir = build_dir, duplicate = False)
Import(binaries + ["sources"])

View file

@ -3,7 +3,6 @@
import commands, os
from subprocess import Popen, PIPE
from glob import glob
from install import HardLink
Import("*")
@ -295,12 +294,10 @@ libwesnoth_extras = env.Library("wesnoth_extras", wesnoth_sources)
def WesnothProgram(env, target, source, can_build, **kw):
if can_build:
bin = env.Program(target, source, **kw)
link = env.Command("#/" + target + build_suffix, bin, HardLink("$TARGET", "$SOURCE"))
bin = env.Program("#/" + target + build_suffix, source, **kw)
else:
bin = None
link = None
env.Alias(target, link)
env.Alias(target, bin)
exec target + " = bin"
Export(target)