Changeset - r6818:53d4e5b984f7
[Not reviewed]
master
0 1 0
glx - 17 years ago 2007-06-07 13:40:20
glx@openttd.org
(svn r10057) -Fix (r10051): git version detection didn't work for mingw/msys
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
Makefile.src.in
Show inline comments
 
@@ -91,25 +91,25 @@ ifdef REVISION
 
REV := $(REVISION)
 
else
 
# Are we a SVN dir?
 
ifeq ($(shell if test -d $(SRC_DIR)/.svn; then echo 1; fi), 1)
 
# Find if the local source if modified
 
REV_MODIFIED := $(shell svnversion $(SRC_DIR) | sed -n 's/.*\(M\).*/\1/p' )
 
# Find the revision like: rXXXX-branch
 
REV := $(shell LC_ALL=C svn info $(SRC_DIR) | $(AWK) '/^URL:.*branch/ { split($$2, a, "/"); BRANCH="-"a[5] } /^Last Changed Rev:/ { REV="r"$$4"$(REV_MODIFIED)" } END { print REV BRANCH }')
 
else
 
# Are we a git dir?
 
ifeq ($(shell if test -d $(SRC_DIR)/../.git; then echo 1; fi), 1)
 
# Find the revision like: rXXXXM
 
REV := g$(shell if head=`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 := g$(shell if head=`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$$//')
 
endif
 
endif
 
endif
 

	
 
# Make sure we have something in REV
 
ifeq ($(REV),)
 
REV := norev000
 
endif
 

	
 
# This helps to recompile if flags change
 
RES := $(shell if [ "`cat $(CONFIG_CACHE_COMPILER) 2>/dev/null`" != "$(CC_CFLAGS) $(CFLAGS)" ]; then echo "$(CC_CFLAGS) $(CFLAGS)" > $(CONFIG_CACHE_COMPILER); fi )
 
RES := $(shell if [ "`cat $(CONFIG_CACHE_LINKER) 2>/dev/null`" != "$(LDFLAGS) $(LIBS)" ]; then echo "$(LDFLAGS) $(LIBS)" > $(CONFIG_CACHE_LINKER); fi )
0 comments (0 inline, 0 general)