From 623a6f4730414586a376faa7cc16aa239590f3c2 Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Thu, 23 Jul 2020 21:07:06 -0700 Subject: g build.mk: fix awk program bug The recent modification of chip/g/build.mk introduced a bug where an awk script error is reported if the board name does not contain an underscore. It went unnoticed because it does not prevent make from reporting success and most boards do not care about the results of running of this awk script. This patch fixes the problem. BUG=none TEST=ran make for cr50 and hslt_d2c, observed proper modification of the manifest, verified that no script errors are reported any more. Signed-off-by: Vadim Bendebury Change-Id: I0981411ec7bc17e4473d4b33125f76b75983d974 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2317059 Reviewed-by: Namyoon Woo --- chip/g/build.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chip/g/build.mk b/chip/g/build.mk index f4d71a3df3..f1ec4cc03f 100644 --- a/chip/g/build.mk +++ b/chip/g/build.mk @@ -215,7 +215,7 @@ HEX_NAME := $(shell printf "$(BOARD)" | /usr/bin/awk -F_ ' \ {if (NF == 2) \ { printf($$1" "toupper($$2)) } \ else \ - { printf } \ + { printf($$0) } \ }' | xxd -ps) # This many zeros in the tag field need to be replaced. HEX_LEN := $(shell printf $(HEX_NAME) | wc -c) -- cgit v1.2.1