Commit 29958745 authored by Jan Maria Matejka's avatar Jan Maria Matejka

Makefile: Only set git version if BIRD is build from its repository.

Thanks to Toke Høiland-Jørgensen <toke@toke.dk> for reporting this bug.
parent 823ad121
Pipeline #35949 passed with stages
in 4 minutes and 43 seconds
......@@ -21,11 +21,6 @@ INSTALL=@INSTALL@
INSTALL_PROGRAM=@INSTALL_PROGRAM@
INSTALL_DATA=@INSTALL_DATA@
git-label:=$(strip $(shell git describe --always --dirty=-x 2>/dev/null))
ifneq ($(git-label),)
CFLAGS += -DGIT_LABEL="$(git-label)"
endif
client=$(addprefix $(exedir)/,@CLIENT@)
daemon=$(exedir)/bird
protocols=@protocols@
......@@ -42,6 +37,11 @@ srcdir := @srcdir@
objdir := @objdir@
exedir := @exedir@
git-label:=$(strip $(shell cd $(srcdir) && [ "$$(git rev-parse --show-toplevel)" = "$$(readlink -f .)" ] && git describe --always --dirty=-x 2>/dev/null))
ifneq ($(git-label),)
CFLAGS += -DGIT_LABEL="$(git-label)"
endif
ifeq ($(objdir),.)
objdir := $(realpath .)
endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment