summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2007-11-18 20:38:24 +0000
committerglx <glx@openttd.org>2007-11-18 20:38:24 +0000
commit272a21077d5bfb2e4a4041460fc9087aa69e7cc4 (patch)
tree8b5cd856e6914f6724a67fcbbe94e3d8248ee294
parente15a5365d1134fd449f013428a9ae6d167a855ee (diff)
downloadopenttd-272a21077d5bfb2e4a4041460fc9087aa69e7cc4.tar.xz
(svn r11468) -Fix (r11330): rev number detection didn't work for git with msys/mingw
-rw-r--r--Makefile.src.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile.src.in b/Makefile.src.in
index 506f401fc..2cb3059ae 100644
--- a/Makefile.src.in
+++ b/Makefile.src.in
@@ -106,13 +106,13 @@ else
ifeq ($(shell if test -d $(SRC_DIR)/../.git; then echo 1; fi), 1)
# Find the revision like: gXXXXM-branch
REV := g$(shell if head=`LC_ALL=C git rev-parse --verify HEAD 2>/dev/null`; then echo "$$head" | cut -c1-8; fi)$(shell if git diff-index HEAD | read dummy; then echo M; fi)$(shell git branch|grep '[*]' | sed 's/\* /-/;s/^-master$$//')
-REV_NR := $(shell echo `LC_ALL=C cd "$(SRC_DIR)/.." && git log --pretty=format:%s src | grep "^(svn r[0-9]*)" | head -n 1 | sed "s/.*(svn r\([0-9]*\)).*/\1/"` )
+REV_NR := $(shell LC_ALL=C cd "$(SRC_DIR)/.." && git log --pretty=format:%s src | grep -m 1 "^(svn r[0-9]*)" | sed "s/.*(svn r\([0-9]*\)).*/\1/" )
else
# Are we a hg (Mercurial) dir?
ifeq ($(shell if test -d $(SRC_DIR)/../.hg; then echo 1; fi), 1)
# Find the revision like: hXXXXM-branch
REV := h$(shell if head=`LC_ALL=C hg tip 2>/dev/null`; then echo "$$head" | head -n 1 | cut -c19-26; fi)$(shell if hg status $(SRC_DIR) | grep -v '^?' | read dummy; then echo M; fi)$(shell hg branch | sed 's/^/-/;s/^-default$$//')
-REV_NR := $(shell LC_ALL=C hg log -k "svn" -l 1 --template "{desc}\n" $(SRC_DIR) | grep "^(svn r[0-9]*)" | head -n 1 | sed "s/.*(svn r\([0-9]*\)).*/\1/" )
+REV_NR := $(shell LC_ALL=C hg log -k "svn" -l 1 --template "{desc}\n" $(SRC_DIR) | grep -m 1 "^(svn r[0-9]*)" | sed "s/.*(svn r\([0-9]*\)).*/\1/" )
endif
endif
endif