diff options
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): |