This commit is contained in:
Garry Boyer
2007-08-22 15:13:05 +00:00
parent 1b1b7183e1
commit 501948afc5
3 changed files with 100 additions and 43 deletions
+5 -1
View File
@@ -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,
+4 -2
View File
@@ -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)