diff options
author | Anup Patel <anup.patel@wdc.com> | 2019-02-19 13:15:35 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2019-02-19 13:47:18 +0530 |
commit | 6a3dc84f669a560dbb5a396ceda67612551697d6 (patch) | |
tree | 4d9f5d395d445198e0abae0ff26c9a5f7e1ecad0 | |
parent | f4a17177ce05f74cc33a985868f704d086ac75d5 (diff) | |
download | opensbi-6a3dc84f669a560dbb5a396ceda67612551697d6.zip opensbi-6a3dc84f669a560dbb5a396ceda67612551697d6.tar.gz opensbi-6a3dc84f669a560dbb5a396ceda67612551697d6.tar.bz2 |
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>
-rw-r--r-- | Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -51,8 +51,8 @@ export lib_dir=$(CURDIR)/lib export firmware_dir=$(CURDIR)/firmware # Find library version -OPENSBI_VERSION_MAJOR=`grep MAJOR $(include_dir)/sbi/sbi_version.h | awk '{ print $$3 }'` -OPENSBI_VERSION_MINOR=`grep MINOR $(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 | sed 's/.*MINOR.*\([0-9][0-9]*\)/\1/'` # Setup compilation commands ifdef CROSS_COMPILE |