From: Larry Doolittle Date: Fri, 14 Aug 2015 20:46:22 +0000 (-0700) Subject: Fix version strings for out-of-tree builds X-Git-Tag: yosys-0.6~193 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1e67b2991916077260fbaf8679608c07375a19ac;p=yosys.git Fix version strings for out-of-tree builds Still assumes source tree is a git repository --- diff --git a/Makefile b/Makefile index 6585ca39f..300873803 100644 --- a/Makefile +++ b/Makefile @@ -60,8 +60,8 @@ else LDLIBS += -lrt endif -YOSYS_VER := 0.5+$(shell test -d .git && { git log --author=clifford@clifford.at --oneline c3c9fbfb8c678.. | wc -l; }) -GIT_REV := $(shell git rev-parse --short HEAD 2> /dev/null || echo UNKNOWN) +YOSYS_VER := 0.5+$(shell cd $(YOSYS_SRC) && test -d .git && { git log --author=clifford@clifford.at --oneline c3c9fbfb8c678.. | wc -l; }) +GIT_REV := $(shell cd $(YOSYS_SRC) && git rev-parse --short HEAD 2> /dev/null || echo UNKNOWN) OBJS = kernel/version_$(GIT_REV).o # set 'ABCREV = default' to use abc/ as it is