diff options
author | Martin Roth <gaumless@gmail.com> | 2023-12-08 00:39:54 -0700 |
---|---|---|
committer | Martin L Roth <gaumless@gmail.com> | 2023-12-17 19:32:00 +0000 |
commit | 224098dffd8f1f59b2345e1bd27691f7d5e94f31 (patch) | |
tree | 6c696eddee19f1bf5d4f6ed3c071a208d54bf291 /Makefile.inc | |
parent | 6a3d64ab1ca29e07b0ce4413329f22d0adc7ccc3 (diff) | |
download | coreboot-224098dffd8f1f59b2345e1bd27691f7d5e94f31.tar.gz coreboot-224098dffd8f1f59b2345e1bd27691f7d5e94f31.tar.bz2 coreboot-224098dffd8f1f59b2345e1bd27691f7d5e94f31.zip |
Makefile.inc: Update end-of-build targets
The end-of-build targets weren't very granular previously, so warnings
could be lost instead of being printed at the end of the build.
This separates the end-of-build targets into 4 different groups, in this
order:
- build_complete: The coreboot build itself is done
- files_added: All files have been added to CBFS
- show_coreboot: Display any normal coreboot build messages
- show_notices: Display any warnings or notes
Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: Ia67446f164b8e66415a1a8c196999316fdf39f1e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79382
Reviewed-by: Patrick Georgi <patrick@coreboot.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'Makefile.inc')
-rw-r--r-- | Makefile.inc | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/Makefile.inc b/Makefile.inc index e382518af066..44cd0eaeb650 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -59,22 +59,36 @@ COREBOOT_EXPORTS += CCACHE_EXTRAFILES ####################################################################### # root rule to resolve if in build mode (ie. configuration exists) -real-target: $(obj)/config.h coreboot files_added +real-target: $(obj)/config.h coreboot files_added show_coreboot show_notices coreboot: $(obj)/coreboot.rom $(obj)/cbfstool $(obj)/rmodtool $(obj)/ifwitool $(obj)/cse_fpt $(obj)/cse_serger -# This target can be used in site local to run scripts or additional -# targets after the build completes by creating a Makefile.inc in the -# site-local directory with a target named 'build_complete::' -build_complete:: coreboot +# This target can be used to run scripts or additional targets +# after the build completes by creating a target named 'build_complete::' +.PHONY: build_complete +build_complete:: | coreboot + +# This target can be used to run rules after all files were added to CBFS, +# for example to process FMAP regions or the entire image. +.PHONY: files_added +files_added:: | build_complete + +# This target should come just before the show_notices target. If there +# are no notices, the build should finish with the text of what was just +# built. +.PHONY: show_coreboot +show_coreboot: | files_added + $(CBFSTOOL) $(obj)/coreboot.rom print -r $(subst $(spc),$(comma),$(all-regions)) printf "\nBuilt %s (%s)\n" $(MAINBOARDDIR) $(CONFIG_MAINBOARD_PART_NUMBER) if [ -f "$(CCACHE_STATSLOG)" ]; then \ printf "\nccache statistics\n"; \ $(CCACHE) --show-log-stats -v; \ fi -# This target can be used to run rules after all files were added to CBFS, -# for example to process FMAP regions or the entire image. -files_added:: build_complete +# This is intended to run at the *very end* of the build to show warnings +# notices and the like. If another target needs to be added, add it +# BEFORE this target. +.PHONY: show_notices +show_notices:: | show_coreboot ####################################################################### # our phony targets @@ -1241,7 +1255,6 @@ endif # CONFIG_CPU_INTEL_FIRMWARE_INTERFACE_TABLE @printf " CBFSLAYOUT $(subst $(obj)/,,$(@))\n\n" $(CBFSTOOL) $@ layout @printf " CBFSPRINT $(subst $(obj)/,,$(@))\n\n" - $(CBFSTOOL) $@ print -r $(subst $(spc),$(comma),$(all-regions)) ifeq ($(CONFIG_CBFS_VERIFICATION),y) line=$$($(CBFSTOOL) $@ print -kv 2>/dev/null | grep -F '[CBFS VERIFICATION (COREBOOT)]') ;\ if ! printf "$$line" | grep -q 'fully valid'; then \ |