(svn r14262) -Feature [Makefile]: Let Makefile.bundle.in also use the new findversion.sh
authormatthijs
Sun, 07 Sep 2008 13:36:18 +0000
changeset 10086 259601e31f79
parent 10085 de2d010b7db9
child 10087 3159b77d3506
(svn r14262) -Feature [Makefile]: Let Makefile.bundle.in also use the new findversion.sh
script. This enables revision detection for bundles for git and hg checkouts.
Makefile.bundle.in
--- a/Makefile.bundle.in	Sun Sep 07 13:24:49 2008 +0000
+++ b/Makefile.bundle.in	Sun Sep 07 13:36:18 2008 +0000
@@ -6,14 +6,11 @@
 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:.*branches/ { split($$2, a, "/"); for (i in a) if(a[i]=="branches") { BRANCH="-"a[i+1]; break } } /^Last Changed Rev:/ { REV="r"$$4"$(REV_MODIFIED)" } END { print REV BRANCH }')
+# Detect the revision
+VERSIONS := $(shell AWK="$(AWK)" "$(ROOT_DIR)/findversion.sh")
+REV      := $(shell echo "$(VERSIONS)" | cut -f 1)
 endif
-endif
+
 # Make sure we have something in REV
 ifeq ($(REV),)
 REV := norev000