If Bird is compiled from a release tarball, but there is a git repository somewhere in a parent directory, the Makefile git version logic will pick up that version and use it as the Bird version, which is obviously not desirable. For instance, on OpenWrt this results in something like this: BIRD version reboot-6789-g4e9ce23aa5 Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk> --- Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index c8168bbe..1184d583 100644 --- a/Makefile.in +++ b/Makefile.in @@ -21,7 +21,7 @@ INSTALL=@INSTALL@ INSTALL_PROGRAM=@INSTALL_PROGRAM@ INSTALL_DATA=@INSTALL_DATA@ -git-label:=$(strip $(shell git describe --always --dirty=-x 2>/dev/null)) +git-label:=$(strip $(shell [ -d .git ] && git describe --always --dirty=-x 2>/dev/null)) ifneq ($(git-label),) CFLAGS += -DGIT_LABEL="$(git-label)" endif -- 2.17.0