Makefile.src.in
branchnoai
changeset 9704 197cb8c6ae17
parent 9703 d2a6acdbd665
child 9722 ebf0ece7d8f6
equal deleted inserted replaced
9703:d2a6acdbd665 9704:197cb8c6ae17
   100 # Find the revision like: rXXXX-branch
   100 # Find the revision like: rXXXX-branch
   101 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 }')
   101 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 }')
   102 else
   102 else
   103 # Are we a git dir?
   103 # Are we a git dir?
   104 ifeq ($(shell if test -d $(SRC_DIR)/../.git; then echo 1; fi), 1)
   104 ifeq ($(shell if test -d $(SRC_DIR)/../.git; then echo 1; fi), 1)
   105 # Find the revision like: rXXXXM
   105 # Find the revision like: gXXXXM-branch
   106 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$$//')
   106 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$$//')
       
   107 else
       
   108 # Are we a hg (Mercurial) dir?
       
   109 ifeq ($(shell if test -d $(SRC_DIR)/../.hg; then echo 1; fi), 1)
       
   110 # Find the revision like: hXXXXM-branch
       
   111 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 | grep -v '^?' | read dummy; then echo M; fi)$(shell hg branch | sed 's/^/-/;s/^-default$$//')
       
   112 endif
   107 endif
   113 endif
   108 endif
   114 endif
   109 endif
   115 endif
   110 
   116 
   111 # Make sure we have something in REV
   117 # Make sure we have something in REV