From 70f3d438546a62d116761bd84d5b517f3e627663 Mon Sep 17 00:00:00 2001 From: Idwer Vollering Date: Wed, 4 Aug 2021 12:56:11 +0200 Subject: [PATCH] util/genbuild_h: micro-adjust the regexp used to set COREBOOT_MAJOR_VERSION On FreeBSD, every build target would show warnings from its builtin printf(). Change the regexp to be compatible with BSD sed. This will avoid noise like "printf: 4.14-1278-g5d74ccf1c3: not completely converted". Signed-off-by: Idwer Vollering Signed-off-by: Jessica Clarke Change-Id: I1c0c260fd8d42e23a612a353a288e472cc068c8e Reviewed-on: https://review.coreboot.org/c/coreboot/+/56803 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans Reviewed-by: Nico Huber --- util/genbuild_h/genbuild_h.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/genbuild_h/genbuild_h.sh b/util/genbuild_h/genbuild_h.sh index c898fb6e3f..8c72ddfb4a 100755 --- a/util/genbuild_h/genbuild_h.sh +++ b/util/genbuild_h/genbuild_h.sh @@ -70,7 +70,7 @@ printf "#define COREBOOT_VERSION_TIMESTAMP $DATE\n" printf "#define COREBOOT_ORIGIN_GIT_REVISION \"$GITREV\"\n" printf "#define COREBOOT_EXTRA_VERSION \"%s\"\n" "$COREBOOT_EXTRA_VERSION" -printf "#define COREBOOT_MAJOR_VERSION %d\n#define COREBOOT_MINOR_VERSION %d\n" `git describe --match [0-9].[0-9]* | sed 's/\([0-9]\)\.\([0-9]\+\).*/\1 \2/'` +printf "#define COREBOOT_MAJOR_VERSION %d\n#define COREBOOT_MINOR_VERSION %d\n" `git describe --match [0-9].[0-9]* | sed 's/\([0-9]\)\.\([0-9][0-9]*\).*/\1 \2/'` printf "#define COREBOOT_BUILD \"$(our_date "$DATE")\"\n" printf "#define COREBOOT_BUILD_YEAR_BCD 0x$(our_date "$DATE" +%y)\n" printf "#define COREBOOT_BUILD_MONTH_BCD 0x$(our_date "$DATE" +%m)\n"