- Massage the code to generate the top level Makefile so the
generated Makefile has correct dependencies and is somewhat complete. git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1751 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
41d0fa38af
commit
0e99655670
|
@ -1901,9 +1901,11 @@ parser Config:
|
||||||
# FILE OUTPUT
|
# FILE OUTPUT
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
def writemakefileheader(file, fname):
|
def writemakefileheader(file, fname):
|
||||||
file.write("# File: %s\n" % fname)
|
file.write("# File: %s is autogenerated\n" % fname)
|
||||||
file.write("# This file was generated by '%s %s %s'\n\n"
|
file.write("Makefile: %s %s\n"
|
||||||
% (sys.argv[0], sys.argv[1], sys.argv[2]))
|
% (os.path.abspath(sys.argv[0]), top_config_file))
|
||||||
|
file.write("\t(cd %s ; %s %s %s)\n\n"
|
||||||
|
% (os.getcwd(), sys.argv[0], sys.argv[1], sys.argv[2]))
|
||||||
|
|
||||||
def writemakefilesettings(path):
|
def writemakefilesettings(path):
|
||||||
""" Write Makefile.settings to seperate the settings
|
""" Write Makefile.settings to seperate the settings
|
||||||
|
@ -2116,30 +2118,38 @@ def writemakefile(path):
|
||||||
file.write("include Makefile.settings\n\n")
|
file.write("include Makefile.settings\n\n")
|
||||||
|
|
||||||
# main rule
|
# main rule
|
||||||
file.write("all: ")
|
file.write("all:")
|
||||||
for i in romimages.keys():
|
for i in buildroms:
|
||||||
file.write("%s-rom " % i)
|
file.write(" %s" % i.name)
|
||||||
file.write("buildroms\n\n")
|
file.write("\n\n")
|
||||||
for i, o in romimages.items():
|
for i, o in romimages.items():
|
||||||
file.write("%s-rom:\n" % o.getname())
|
file.write("%s/linuxbios.rom:\n" % o.getname())
|
||||||
file.write("\tif (cd %s; \\\n" % o.getname())
|
file.write("\tif (cd %s; \\\n" % o.getname())
|
||||||
file.write("\t\tmake linuxbios.rom)\\\n")
|
file.write("\t\tmake linuxbios.rom)\\\n")
|
||||||
file.write("\tthen true; else exit 1; fi;\n\n")
|
file.write("\tthen true; else exit 1; fi;\n\n")
|
||||||
file.write("clean: ")
|
file.write("clean: ")
|
||||||
for i in romimages.keys():
|
for i in romimages.keys():
|
||||||
file.write("%s-clean " % i)
|
file.write(" %s-clean" % i)
|
||||||
file.write("\n\n")
|
file.write("\n\n")
|
||||||
for i, o in romimages.items():
|
for i, o in romimages.items():
|
||||||
file.write("%s-clean:\n" % o.getname())
|
file.write("%s-clean:\n" % o.getname())
|
||||||
file.write("\t(cd %s; make clean)\n" % o.getname())
|
file.write("\t(cd %s; make clean)\n\n" % o.getname())
|
||||||
|
|
||||||
file.write("\nbuildroms:\n")
|
|
||||||
for i in buildroms:
|
for i in buildroms:
|
||||||
file.write("\tcat ")
|
file.write("%s:" % i.name)
|
||||||
for j in i.roms:
|
for j in i.roms:
|
||||||
file.write("%s/linuxbios.rom " % j )
|
file.write(" %s/linuxbios.rom " % j)
|
||||||
file.write("> %s\n" % i.name)
|
file.write("\n")
|
||||||
file.write("\n")
|
file.write("\t cat ")
|
||||||
|
for j in i.roms:
|
||||||
|
file.write(" %s/linuxbios.rom " % j)
|
||||||
|
file.write("> %s\n\n" %i.name)
|
||||||
|
|
||||||
|
|
||||||
|
file.write(".PHONY: all clean")
|
||||||
|
for i in romimages.keys():
|
||||||
|
file.write(" %s-clean" % i)
|
||||||
|
file.write("\n\n")
|
||||||
|
|
||||||
file.close()
|
file.close()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue