hi
This commit is contained in:
@@ -564,7 +564,11 @@ class Loader:
|
||||
register(name, BinRule(longname, sourcerules(Types.LINKABLE, deplibs)))
|
||||
build_file_path = os.path.join(real_path, BUILD_FILE)
|
||||
print "... Reading %s" % (build_file_path)
|
||||
text = util.readfile(build_file_path)
|
||||
try:
|
||||
text = util.readfile(build_file_path)
|
||||
except IOError:
|
||||
print "!!! Build file '%s' not found, assuming blank." % build_file_path
|
||||
text = ""
|
||||
# remove DOS line feeds and add posttext
|
||||
text = text.replace("\r", "") + "\n" + posttext
|
||||
exec text in {"register" : register, "Types" : Types,
|
||||
|
||||
@@ -114,8 +114,10 @@ print "*** Target Rule: '%s'" % target_name
|
||||
loader = buildsys.Loader(real_rootpath)
|
||||
if implicit:
|
||||
target_shortname = target_name[target_name.index(":")+1:]
|
||||
posttext = "binrule(name = '%s', sources=['%s.cc'], linkables = [':'])" \
|
||||
% (target_shortname, target_shortname)
|
||||
fx.param_default("lib", "fastlib:fastlib")
|
||||
lib = fx.param_str("lib")
|
||||
posttext = "binrule(name = '%s', sources=['%s.cc'], linkables = ['%s'])" \
|
||||
% (target_shortname, target_shortname, lib)
|
||||
else:
|
||||
posttext = ""
|
||||
target = loader.find_rule(target_name, real_path, fake_path, posttext)
|
||||
|
||||
Reference in New Issue
Block a user