From 56e62e55f3d7adaf434b5dc90be323a0ec2b56c1 Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Fri, 23 May 2008 15:29:19 +0000 Subject: get version string built correctly, fix some minor bugs in the configure script git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@4342 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- Makefile | 4 +-- build_tools/make_svn_branch_name | 61 ---------------------------------------- build_tools/make_version | 2 +- configure.ac | 8 +++--- 4 files changed, 7 insertions(+), 68 deletions(-) delete mode 100755 build_tools/make_svn_branch_name diff --git a/Makefile b/Makefile index 644fea6..de7f8b2 100644 --- a/Makefile +++ b/Makefile @@ -75,7 +75,7 @@ ifneq ($(wildcard .version),) TOOLSVERSION:=$(shell cat .version) else ifneq ($(wildcard .svn),) - TOOLSVERSION=SVN-$(shell build_tools/make_svn_branch_name) + TOOLSVERSION=$(shell build_tools/make_version . dahdi/tools) endif endif @@ -115,7 +115,7 @@ GROFF_HTML := $(GROFF_PAGES:%=%.html) all: menuselect.makeopts @$(MAKE) _all -_all: programs +_all: prereq programs libs: $(LTZ_SO) $(LTZ_A) diff --git a/build_tools/make_svn_branch_name b/build_tools/make_svn_branch_name deleted file mode 100755 index b4b712d..0000000 --- a/build_tools/make_svn_branch_name +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/sh - -PARTS=`LANG=C svn info | grep URL | awk '{print $2;}' | sed -e s:^.*/svn/zaptel/:: | sed -e 's:/: :g'` -BRANCH=0 -TEAM=0 -TAG=0 - -REV=`svnversion -c . | cut -d: -f2` - -if [ "${PARTS}" = "trunk" ] -then - echo 'trunk'-r${REV} - exit 0 -fi - -for PART in $PARTS -do - if [ ${TAG} != 0 ] - then - RESULT="${PART}" - break - fi - - 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 - TAG=1 - continue - fi - - if [ "${PART}" = "team" ] - then - TEAM=1 - continue - fi -done - -if [ ${TAG} != 0 ] -then - echo ${RESULT} -else - echo ${RESULT##-}-r${REV} -fi diff --git a/build_tools/make_version b/build_tools/make_version index d710ffa..e6caaa2 100755 --- a/build_tools/make_version +++ b/build_tools/make_version @@ -5,7 +5,7 @@ if [ -f ${1}/.version ]; then 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/zaptel/:: | sed -e 's:/: :g'` + PARTS=`LANG=C svn info ${1} | grep URL | awk '{print $2;}' | sed -e s:^.*/svn/${2}/:: | sed -e 's:/: :g'` BRANCH=0 TEAM=0 diff --git a/configure.ac b/configure.ac index 0ffc2c3..fbf6e7a 100644 --- a/configure.ac +++ b/configure.ac @@ -1,12 +1,12 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) - -m4_define([DAHDI_VERSION], - m4_bpatsubst(m4_esyscmd([build_tools/make_version .]), + +m4_define([TOOLSVERSION], + m4_bpatsubst(m4_esyscmd([build_tools/make_version . dahdi/tools]), [\([0-9.]*\)\(\w\|\W\)*], [\1])) -AC_INIT(zaptel, DAHDI_VERSION, www.asterisk.org) +AC_INIT(dahdi, TOOLSVERSION, www.asterisk.org) # check existence of the package AC_CONFIG_SRCDIR([dahdi_cfg.c]) -- cgit v1.2.3