diff options
author | Eric Biederman <ebiederm@xmission.com> | 2004-11-05 08:21:05 +0000 |
---|---|---|
committer | Eric Biederman <ebiederm@xmission.com> | 2004-11-05 08:21:05 +0000 |
commit | 0e99655670a61aebb9d46dd46f8d99ff193051f4 (patch) | |
tree | c1839fe2684ccf5b6512d5cc3789317b717c34a8 /util/newconfig/config.g | |
parent | 41d0fa38af010fdb2f9456ae3f693b1cadcc6bd6 (diff) |
- 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
Diffstat (limited to 'util/newconfig/config.g')
-rw-r--r-- | util/newconfig/config.g | 44 |
1 files changed, 27 insertions, 17 deletions
diff --git a/util/newconfig/config.g b/util/newconfig/config.g index ef663577f4..60b8d4f249 100644 --- a/util/newconfig/config.g +++ b/util/newconfig/config.g @@ -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): |