summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIdwer Vollering <vidwer@gmail.com>2021-08-04 12:56:11 +0200
committerArthur Heymans <arthur@aheymans.xyz>2022-03-30 20:06:57 +0000
commit70f3d438546a62d116761bd84d5b517f3e627663 (patch)
tree1cb27647b08e1f28514132c1c41c32f59c57b284
parent707eaced711513fa724b76ef385ce063a7d7cf18 (diff)
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 <vidwer@gmail.com> Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com> Change-Id: I1c0c260fd8d42e23a612a353a288e472cc068c8e Reviewed-on: https://review.coreboot.org/c/coreboot/+/56803 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Nico Huber <nico.h@gmx.de>
-rwxr-xr-xutil/genbuild_h/genbuild_h.sh2
1 files changed, 1 insertions, 1 deletions
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"