[asterisk-commits] branch group/autoconf_and_menuselect r11046 - in /team/group/autoconf_and_men...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Feb 24 19:14:05 MST 2006


Author: kpfleming
Date: Fri Feb 24 20:14:05 2006
New Revision: 11046

URL: http://svn.digium.com/view/asterisk?rev=11046&view=rev
Log:
move make_svn_branch_name contents into a script that does the whole 'figure out the version number' job instead of just part of it

Added:
    team/group/autoconf_and_menuselect/build_tools/make_version   (with props)
Removed:
    team/group/autoconf_and_menuselect/build_tools/make_svn_branch_name
Modified:
    team/group/autoconf_and_menuselect/Makefile

Modified: team/group/autoconf_and_menuselect/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/Makefile?rev=11046&r1=11045&r2=11046&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/Makefile (original)
+++ team/group/autoconf_and_menuselect/Makefile Fri Feb 24 20:14:05 2006
@@ -330,8 +330,9 @@
 
 LIBEDIT=editline/libedit.a
 
+ASTERISKVERSION=$(shell build_tools/make_version .)
+
 ifneq ($(wildcard .version),)
-  ASTERISKVERSION:=$(shell cat .version)
   ASTERISKVERSIONNUM:=$(shell awk -F. '{printf "%02d%02d%02d", $$1, $$2, $$3}' .version)
   RPMVERSION:=$(shell sed 's/[-\/:]/_/g' .version)
 else
@@ -343,11 +344,9 @@
 # showing the branch they are made from
 ifneq ($(wildcard .svnrevision),)
   ASTERISKVERSIONNUM=999999
-  ASTERISKVERSION:=SVN-$(shell cat .svnbranch)-r$(shell cat .svnrevision)
 else
   ifneq ($(wildcard .svn),)
     ASTERISKVERSIONNUM=999999
-    ASTERISKVERSION=SVN-$(shell build_tools/make_svn_branch_name)
   endif
 endif
 
@@ -969,7 +968,7 @@
 
 _menuselect:
 	$(MAKE) -C build_tools _menuselect
-	
+
 mxml/libmxml.a: FORCE
 	@cd mxml && unset CFLAGS && test -f config.h || ./configure
 	$(MAKE) -C mxml libmxml.a

Added: team/group/autoconf_and_menuselect/build_tools/make_version
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/build_tools/make_version?rev=11046&view=auto
==============================================================================
--- team/group/autoconf_and_menuselect/build_tools/make_version (added)
+++ team/group/autoconf_and_menuselect/build_tools/make_version Fri Feb 24 20:14:05 2006
@@ -1,0 +1,56 @@
+#!/bin/sh
+
+if [ -f ${1}/.version ]; then
+	cat ${1}.version
+elif [ -f ${1}/.svnrevision ]; then
+	echo SVN-`cat ${1}/.svnbranch`-r`cat ${1}.svnrevision`
+elif [ -d .svn ]; then
+    PARTS=`LANG=C svn info ${1} | grep URL | awk '{print $2;}' | sed -e s:^.*/svn/asterisk/:: | sed -e 's:/: :g'`
+    BRANCH=0
+    TEAM=0
+    
+    REV=`svnversion -c ${1} | cut -d: -f2`
+    
+    if [ "${PARTS}" = "trunk" ]
+	then
+	echo SVN-'trunk'-r${REV}
+	exit 0
+    fi
+    
+    for PART in $PARTS
+      do
+      if [ ${BRANCH} != 0 ]
+	  then
+	  RESULT="${RESULT}-${PART}"
+	  break
+      fi
+      
+      if [ ${TEAM} != 0 ]
+	  then
+	  RESULT="${RESULT}-${PART}"
+	  continue
+      fi
+      
+      if [ "${PART}" = "branches" ]
+	  then
+	  BRANCH=1
+	  RESULT="branch"
+	  continue
+      fi
+      
+      if [ "${PART}" = "tags" ]
+	  then
+	  BRANCH=1
+	  RESULT="tag"
+	  continue
+      fi
+      
+      if [ "${PART}" = "team" ]
+	  then
+	  TEAM=1
+	  continue
+      fi
+    done
+    
+    echo SVN-${RESULT##-}-r${REV}
+fi

Propchange: team/group/autoconf_and_menuselect/build_tools/make_version
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/group/autoconf_and_menuselect/build_tools/make_version
------------------------------------------------------------------------------
    svn:executable = *

Propchange: team/group/autoconf_and_menuselect/build_tools/make_version
------------------------------------------------------------------------------
    svn:keywords = Author Id Date Revision

Propchange: team/group/autoconf_and_menuselect/build_tools/make_version
------------------------------------------------------------------------------
    svn:mime-type = text/plain



More information about the asterisk-commits mailing list