mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 23:41:23 +01:00
Makefile: Use sed instead of awk to parse OpenSBI version
This patch replaces use of awk with sed in top-level makefile to parse OpenSBI version from include/sbi/sbi_version.h. Signed-off-by: Anup Patel <anup.patel@wdc.com>
This commit is contained in:
4
Makefile
4
Makefile
@@ -51,8 +51,8 @@ export lib_dir=$(CURDIR)/lib
|
|||||||
export firmware_dir=$(CURDIR)/firmware
|
export firmware_dir=$(CURDIR)/firmware
|
||||||
|
|
||||||
# Find library version
|
# Find library version
|
||||||
OPENSBI_VERSION_MAJOR=`grep MAJOR $(include_dir)/sbi/sbi_version.h | awk '{ print $$3 }'`
|
OPENSBI_VERSION_MAJOR=`grep MAJOR $(include_dir)/sbi/sbi_version.h | sed 's/.*MAJOR.*\([0-9][0-9]*\)/\1/'`
|
||||||
OPENSBI_VERSION_MINOR=`grep MINOR $(include_dir)/sbi/sbi_version.h | awk '{ print $$3 }'`
|
OPENSBI_VERSION_MINOR=`grep MINOR $(include_dir)/sbi/sbi_version.h | sed 's/.*MINOR.*\([0-9][0-9]*\)/\1/'`
|
||||||
|
|
||||||
# Setup compilation commands
|
# Setup compilation commands
|
||||||
ifdef CROSS_COMPILE
|
ifdef CROSS_COMPILE
|
||||||
|
Reference in New Issue
Block a user