- 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
|
||||
#=============================================================================
|
||||
def writemakefileheader(file, fname):
|
||||
file.write("# File: %s\n" % fname)
|
||||
file.write("# This file was generated by '%s %s %s'\n\n"
|
||||
% (sys.argv[0], sys.argv[1], sys.argv[2]))
|
||||
file.write("# File: %s is autogenerated\n" % fname)
|
||||
file.write("Makefile: %s %s\n"
|
||||
% (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):
|
||||
""" Write Makefile.settings to seperate the settings
|
||||
|
@ -2116,31 +2118,39 @@ def writemakefile(path):
|
|||
file.write("include Makefile.settings\n\n")
|
||||
|
||||
# main rule
|
||||
file.write("all: ")
|
||||
for i in romimages.keys():
|
||||
file.write("%s-rom " % i)
|
||||
file.write("buildroms\n\n")
|
||||
file.write("all:")
|
||||
for i in buildroms:
|
||||
file.write(" %s" % i.name)
|
||||
file.write("\n\n")
|
||||
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("\t\tmake linuxbios.rom)\\\n")
|
||||
file.write("\tthen true; else exit 1; fi;\n\n")
|
||||
file.write("clean: ")
|
||||
for i in romimages.keys():
|
||||
file.write("%s-clean " % i)
|
||||
file.write(" %s-clean" % i)
|
||||
file.write("\n\n")
|
||||
for i, o in romimages.items():
|
||||
file.write("%s-clean:\n" % o.getname())
|
||||
file.write("\t(cd %s; make clean)\n" % o.getname())
|
||||
|
||||
file.write("\nbuildroms:\n")
|
||||
file.write("\t(cd %s; make clean)\n\n" % o.getname())
|
||||
|
||||
for i in buildroms:
|
||||
file.write("\tcat ")
|
||||
file.write("%s:" % i.name)
|
||||
for j in i.roms:
|
||||
file.write("%s/linuxbios.rom " % j )
|
||||
file.write("> %s\n" % i.name)
|
||||
file.write("\n")
|
||||
|
||||
file.write(" %s/linuxbios.rom " % j)
|
||||
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()
|
||||
|
||||
def writeinitincludes(image):
|
||||
|
|
Loading…
Reference in New Issue