util/sconfig: Re-factor emitting of headers to static.c

This change removes call to add_header from parsing functions and
moves it to a local function within main.c. It also adds a new
function emit_headers that is responsible for creating the linked list
for chip headers and emitting those to static.c

BUG=b:80081934
TEST=Verified that static.c for all files compiled using abuild is the
same with and without this change.

Change-Id: I24d526e81323115d3cc927242a4b9e49414afbe0
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/26726
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Furquan Shaikh
2018-05-30 23:46:16 -07:00
parent 79e8412665
commit a0cc5a697c
4 changed files with 61 additions and 56 deletions

View File

@@ -46,7 +46,6 @@ chip: CHIP STRING /* == path */ {
}
chipchildren END {
cur_chip = chip_dequeue_tail();
add_header($<chip>3);
};
device: DEVICE BUS NUMBER /* == devnum */ BOOL {