1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

BUILD_ID: Fix dirt check when srcdir != builddir.

I also tried git --work-tree=$(top_srcdir) but did not get it to work.
This commit is contained in:
Kalle Olavi Niemitalo 2008-03-01 14:07:47 +02:00 committed by Kalle Olavi Niemitalo
parent 747b32b735
commit b0c5da3ddf

View File

@ -30,7 +30,7 @@ SUBDIRS = \
# Get the GIT HEAD ID if possible # Get the GIT HEAD ID if possible
ifdef GIT ifdef GIT
GITDESC = $(shell $(GIT) --git-dir=$(top_srcdir)/.git rev-parse HEAD 2>/dev/null) 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) BUILD_ID = $(subst elinks-,,$(GITDESC))$(if $(WTDIRTY),-dirty)
endif endif
INCLUDES += -DBUILD_ID="\"$(BUILD_ID)\"" INCLUDES += -DBUILD_ID="\"$(BUILD_ID)\""