summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2019-09-26 07:03:46 +0300
committerAnup Patel <anup@brainfault.org>2019-10-02 14:33:54 +0300
commit2c7bab76a2eb2366026e0482b18679fe94c1dac6 (patch)
tree20753218eea8f52e376b7d48fcb74ef22dfdae83 /Makefile
parent1e9f88889f8b7c66dd229299715eed87e734aafa (diff)
downloadopensbi-2c7bab76a2eb2366026e0482b18679fe94c1dac6.tar.xz
Makefile: Minor fix in OPENSBI_VERSION_GIT
Currently, if someone has forked OpenSBI repo quite sometime back and this fork is not having updated tags from upstream riscv/opensbi repo then "git describe" command can fail. To tackle this, we redirect error output of "git describe" to /dev/null. Signed-off-by: Anup Patel <anup.pate@wdc.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 9784598..9aff070 100644
--- a/Makefile
+++ b/Makefile
@@ -65,7 +65,7 @@ export firmware_dir=$(CURDIR)/firmware
# Find library version
OPENSBI_VERSION_MAJOR=`grep "define OPENSBI_VERSION_MAJOR" $(include_dir)/sbi/sbi_version.h | sed 's/.*MAJOR.*\([0-9][0-9]*\)/\1/'`
OPENSBI_VERSION_MINOR=`grep "define OPENSBI_VERSION_MINOR" $(include_dir)/sbi/sbi_version.h | sed 's/.*MINOR.*\([0-9][0-9]*\)/\1/'`
-OPENSBI_VERSION_GIT=$(shell if [ -d $(src_dir)/.git ]; then git describe; fi)
+OPENSBI_VERSION_GIT=$(shell if [ -d $(src_dir)/.git ]; then git describe 2> /dev/null; fi)
# Setup compilation commands
ifdef CROSS_COMPILE