diff --git a/src/Makefile b/src/Makefile index 826f1e44..6d6f750f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -30,7 +30,7 @@ SUBDIRS = \ # Get the GIT HEAD ID if possible ifdef GIT GITDESC = $(shell $(GIT) --git-dir=$(top_srcdir)/.git rev-parse HEAD 2>/dev/null) -WTDIRTY = $(shell $(GIT) --git-dir=$(top_srcdir)/.git diff-index HEAD 2>/dev/null) +WTDIRTY = $(shell cd "$(top_srcdir)" && $(GIT) diff-index HEAD 2>/dev/null) BUILD_ID = $(subst elinks-,,$(GITDESC))$(if $(WTDIRTY),-dirty) endif INCLUDES += -DBUILD_ID="\"$(BUILD_ID)\""