From 06400d48f1cef8053208ab3d2345fc7d4ac80f07 Mon Sep 17 00:00:00 2001 From: Caveh Jalali Date: Fri, 2 Apr 2021 19:03:52 -0700 Subject: Makefile.rules: Make check_allowed invocation less obscure Originally, the util/check_allowed.sh was completely hidden which made it hard to track, specially since it often flags a change that needs further analysis. With this change, make reports the util/check_allowed.sh invocation as "CHECK_ALLOWED". Also, when building with V=1, the actual command invocation is reported: (brya-shared-image) [brya] $ make -j ... CHECK_ALLOWED build/brya/.config ... OR: (brya-shared-image) [brya] $ make V=1 -j ... ./util/check_allowed.sh build/brya/.config util/config_allowed.txt . ... BRANCH=none BUG=b:181253613 TEST=verified check_allowed is reporte as "CHECK_ALLOWED" during a normal build and as a full command invocation with V=1. Change-Id: Ie1132221ee9b8d5d381adb5413b96ae2a2f71db9 Signed-off-by: Caveh Jalali Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2803974 Reviewed-by: Jack Rosenthal Commit-Queue: Jack Rosenthal --- Makefile.rules | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Makefile.rules') diff --git a/Makefile.rules b/Makefile.rules index e7d8b5d5a0..e80f1cc94a 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -225,6 +225,13 @@ print-boards: $(call cmd_pretty_print_list,\ $(sort $(boards))) +ifeq ($(ALLOW_CONFIG),) +cmd_check_allowed = ./util/check_allowed.sh ${config} util/config_allowed.txt . +else +cmd_check_allowed = true +endif +quiet_cmd_check_allowed = CHECK_ALLOWED ${config} + # Print any important notices at the end of the build. .PHONY: notice notice: $(config) @@ -235,9 +242,7 @@ ifeq ($(TEST_BUILD),) @echo "directory! Otherwise, you won't be able to enter any commands." endif # not a TEST_BUILD endif # CONFIG_EXPERIMENTAL_CONSOLE=y - @if [ -z "${ALLOW_CONFIG}" ]; then \ - ./util/check_allowed.sh ${config} util/config_allowed.txt .; \ - fi + $(call quiet,check_allowed) proj-%: | $(FAILED_BOARDS_DIR) @touch $(FAILED_BOARDS_DIR)/$* -- cgit v1.2.1