From 10ec0fed8e3336d52ab35f8da91a2a9423d3e969 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Sat, 25 Sep 2010 10:40:47 +0000 Subject: - Fix race condition in option_table.h generation by moving the include statement to those files that actually need it. This significantly reduces the number of dependencies, so it's no longer extremely ugly to specify them manually (see the src/pc80/Makefile.inc portion) - Add double include guards around option_table.h defines - Also, drop the AMD DBM690T work around for the issue Signed-off-by: Stefan Reinauer Acked-by: Myles Watson git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5838 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- util/options/build_opt_tbl.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'util') diff --git a/util/options/build_opt_tbl.c b/util/options/build_opt_tbl.c index 277203170d..1d218df4ee 100644 --- a/util/options/build_opt_tbl.c +++ b/util/options/build_opt_tbl.c @@ -591,6 +591,10 @@ int main(int argc, char **argv) /* Walk through the entry records */ ptr = (struct lb_record *)(cmos_table + hdr->header_length); end = (struct lb_record *)(cmos_table + hdr->size); + fprintf(fp, "/* This file is autogenerated.\n" + " * See mainboard's cmos.layout file.\n */\n\n" + "#ifndef __OPTION_TABLE_H\n#define __OPTION_TABLE_H\n\n"); + for(;ptr < end; ptr = (struct lb_record *)(((char *)ptr) + ptr->size)) { if (ptr->tag != LB_TAG_OPTION) { continue; @@ -620,6 +624,7 @@ int main(int argc, char **argv) unlink(tempfilename); exit(1); } + fprintf(fp, "\n#endif // __OPTION_TABLE_H\n"); fclose(fp); UNLINK_IF_NECESSARY(header); -- cgit v1.2.3