mirror of https://github.com/YosysHQ/yosys.git
Makefile: fix GIT_REV extraction if Yosys is built as submodule.
This commit is contained in:
parent
0f2d226ae9
commit
3f173c2180
2
Makefile
2
Makefile
|
@ -149,7 +149,7 @@ YOSYS_VER := 0.26+50
|
||||||
# back to calling git directly.
|
# back to calling git directly.
|
||||||
TARBALL_GIT_REV := $(shell cat $(YOSYS_SRC)/.gitcommit)
|
TARBALL_GIT_REV := $(shell cat $(YOSYS_SRC)/.gitcommit)
|
||||||
ifeq ($(TARBALL_GIT_REV),$$Format:%h$$)
|
ifeq ($(TARBALL_GIT_REV),$$Format:%h$$)
|
||||||
GIT_REV := $(shell git ls-remote $(YOSYS_SRC) HEAD -q | $(AWK) 'BEGIN {R = "UNKNOWN"}; ($$2 == "HEAD") {R = substr($$1, 1, 9); exit} END {print R}')
|
GIT_REV := $(shell GIT_DIR=$(YOSYS_SRC)/.git git rev-parse --short=9 HEAD || echo UNKNOWN)
|
||||||
else
|
else
|
||||||
GIT_REV := $(TARBALL_GIT_REV)
|
GIT_REV := $(TARBALL_GIT_REV)
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in New Issue