This patch removes these warnings:

Makefile:435: warning: overriding commands for target `src/lib/memset.o'

And replaces these debug messages:
partobj dir 0 parent <__main__.partobj instance at 0x7f1e846a7ab8>
part pci_domain
with:
partobj dir 0 parent northbridge_amd_amdk8_root_complex_dev2 part pci_domain

Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4253 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Myles Watson 2009-05-04 20:27:09 +00:00
parent ef04d82ec6
commit f95b49eeb8
1 changed files with 29 additions and 45 deletions

View File

@ -323,6 +323,22 @@ class romimage:
return return
fatal("No such rule \"%s\" for addmakedepend" % id) fatal("No such rule \"%s\" for addmakedepend" % id)
def addmakeobject(self, file, obj):
source = topify(obj[1])
type = obj[2]
if (type == 'S'):
# for .S, .o depends on .s
file.write("%s: %s.s\n" % (obj[0], obj[3]))
file.write("\t$(CC) -c $(CPU_OPT) -o $@ $<\n")
# and .s depends on .S
file.write("%s.s: %s\n" % (obj[3], source))
# Note: next 2 lines are ONE output line!
file.write("\t$(CPP) $(CPPFLAGS) $< ")
file.write(">$@.new && mv $@.new $@\n")
else:
file.write("%s: %s\n" % (obj[0], source))
file.write("\t$(CC) -c $(CFLAGS) -o $@ $<\n")
# this is called with an an object name. # this is called with an an object name.
# the easiest thing to do is add this object to the current # the easiest thing to do is add this object to the current
# component. # component.
@ -608,8 +624,12 @@ class option_value:
class partobj: class partobj:
"""A configuration part""" """A configuration part"""
def __init__ (self, image, dir, parent, part, type_name, instance_name, chip_or_device): def __init__ (self, image, dir, parent, part, type_name, instance_name, chip_or_device):
debug.info(debug.object, "partobj dir %s parent %s part %s" \ if (parent):
% (dir, parent, part)) debug.info(debug.object, "partobj dir %s parent %s part %s" \
% (dir, parent.instance_name, part))
else:
debug.info(debug.object, "partobj dir %s part %s" \
% (dir, part))
# romimage that is configuring this part # romimage that is configuring this part
self.image = image self.image = image
@ -2166,38 +2186,15 @@ def writeimagemakefile(image):
file.write("\n# initobjectrules:\n") file.write("\n# initobjectrules:\n")
for irule, init in image.getinitobjectrules().items(): for irule, init in image.getinitobjectrules().items():
source = topify(init[1]) image.addmakeobject(file, init);
type = init[2]
if (type == 'S'):
# for .S, .o depends on .s
file.write("%s: %s.s\n" % (init[0], init[3]))
file.write("\t$(CC) -c $(CPU_OPT) -o $@ $<\n")
# and .s depends on .S
file.write("%s.s: %s\n" % (init[3], source))
# Note: next 2 lines are ONE output line!
file.write("\t$(CPP) $(CPPFLAGS) $< ")
file.write(">$@.new && mv $@.new $@\n")
else:
file.write("%s: %s\n" % (init[0], source))
file.write("\t$(CC) -c $(CFLAGS) -o $@ $<\n")
file.write("\n# objectrules:\n") file.write("\n# objectrules (don't duplicate initobjects):\n")
for objrule, obj in image.getobjectrules().items(): for objrule, obj in image.getobjectrules().items():
source = topify(obj[1])
type = obj[2] if (getdict(image.getinitobjectrules(), obj[3])):
if (type == 'S'): debug.info(debug.object, "skipping %s" % (obj[3]))
# for .S, .o depends on .s
file.write("%s: %s.s\n" % (obj[0], obj[3]))
file.write("\t$(CC) -c $(CPU_OPT) -o $@ $<\n")
# and .s depends on .S
file.write("%s.s: %s\n" % (obj[3], source))
# Note: next 2 lines are ONE output line!
file.write("\t$(CPP) $(CPPFLAGS) $< ")
file.write(">$@.new && mv $@.new $@\n")
else: else:
file.write("%s: %s\n" % (obj[0], source)) image.addmakeobject(file, obj);
file.write("\t$(CC) -c $(CFLAGS) -o $@ $<\n")
#file.write("%s\n" % objrule[2])
for driverrule, driver in image.getdriverrules().items(): for driverrule, driver in image.getdriverrules().items():
source = topify(driver[1]) source = topify(driver[1])
@ -2207,20 +2204,7 @@ def writeimagemakefile(image):
file.write("\n# smmobjectrules:\n") file.write("\n# smmobjectrules:\n")
for irule, smm in image.getsmmobjectrules().items(): for irule, smm in image.getsmmobjectrules().items():
source = topify(smm[1]) image.addmakeobject(file, smm);
type = smm[2]
if (type == 'S'):
# for .S, .o depends on .s
file.write("%s: %s.s\n" % (smm[0], smm[3]))
file.write("\t$(CC) -c $(CPU_OPT) -o $@ $<\n")
# and .s depends on .S
file.write("%s.s: %s\n" % (smm[3], source))
# Note: next 2 lines are ONE output line!
file.write("\t$(CPP) $(CPPFLAGS) $< ")
file.write(">$@.new && mv $@.new $@\n")
else:
file.write("%s: %s\n" % (smm[0], source))
file.write("\t$(CC) -c $(CFLAGS) -o $@ $<\n")
# special rule for chip_target.c # special rule for chip_target.c
file.write("static.o: static.c\n") file.write("static.o: static.c\n")