Fix version strings for out-of-tree builds

Still assumes source tree is a git repository
This commit is contained in:
Larry Doolittle 2015-08-14 13:46:22 -07:00 committed by Clifford Wolf
parent 6c00704a5e
commit 1e67b29919
1 changed files with 2 additions and 2 deletions

View File

@ -60,8 +60,8 @@ else
LDLIBS += -lrt LDLIBS += -lrt
endif endif
YOSYS_VER := 0.5+$(shell test -d .git && { git log --author=clifford@clifford.at --oneline c3c9fbfb8c678.. | wc -l; }) YOSYS_VER := 0.5+$(shell cd $(YOSYS_SRC) && 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) GIT_REV := $(shell cd $(YOSYS_SRC) && git rev-parse --short HEAD 2> /dev/null || echo UNKNOWN)
OBJS = kernel/version_$(GIT_REV).o OBJS = kernel/version_$(GIT_REV).o
# set 'ABCREV = default' to use abc/ as it is # set 'ABCREV = default' to use abc/ as it is