diff options
author | jeremy <jeremy@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-04-04 07:06:26 +0000 |
---|---|---|
committer | jeremy <jeremy@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-04-04 07:06:26 +0000 |
commit | 6adbb5ecd4648a9152f61e0b6119e5ebca3dfd42 (patch) | |
tree | 7494760f47f730353eb565be5759a5392619e2e1 /channels/h323/Makefile | |
parent | 71fb6b3ec37b3881da0afbd08172399b2d2bbc6f (diff) |
Better dependancy and version checking method, solve call problems when dealing with a gatekeeper, sanity check call cleanup, in hopes to avoid deadlocks (Bugs #3848 #3643, #3591)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5379 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/h323/Makefile')
-rwxr-xr-x | channels/h323/Makefile | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/channels/h323/Makefile b/channels/h323/Makefile index f5203907c..f35cfb226 100755 --- a/channels/h323/Makefile +++ b/channels/h323/Makefile @@ -16,14 +16,17 @@ ifndef ASTETCDIR ASTETCDIR=/etc/asterisk endif -PWLIB_MAJOR_VERSION=$(shell cat ${PWLIBDIR}/version.h | grep MAJOR_VERSION | cut -f3 -d' ') -PWLIB_MINOR_VERSION=$(shell cat ${PWLIBDIR}/version.h | grep MINOR_VERSION | cut -f3 -d' ') -PWLIB_BUILD_NUMBER=$(shell cat ${PWLIBDIR}/version.h | grep BUILD_NUMBER | cut -f3 -d' ') +PWLIBVERSIONFILE=$(PWLIBDIR)/version.h +OPENH323VERSIONFILE=$(OPENH323DIR)/version.h + +PWLIB_MAJOR_VERSION=$(shell test -e ${PWLIBVERSIONFILE} && cat ${PWLIBVERSIONFILE} | grep MAJOR_VERSION | cut -f3 -d' ') +PWLIB_MINOR_VERSION=$(shell test -e ${PWLIBVERSIONFILE} && cat ${PWLIBVERSIONFILE} | grep MINOR_VERSION | cut -f3 -d' ') +PWLIB_BUILD_NUMBER=$(shell test -e ${PWLIBVERSIONFILE} && cat ${PWLIBVERSIONFILE} | grep BUILD_NUMBER | cut -f3 -d' ') PWLIB_VERSION="${PWLIB_MAJOR_VERSION}.${PWLIB_MINOR_VERSION}.${PWLIB_BUILD_NUMBER}" -OPENH323_MAJOR_VERSION=$(shell cat ${OPENH323DIR}/version.h | grep MAJOR_VERSION | cut -f3 -d' ') -OPENH323_MINOR_VERSION=$(shell cat ${OPENH323DIR}/version.h | grep MINOR_VERSION | cut -f3 -d' ') -OPENH323_BUILD_NUMBER=$(shell cat ${OPENH323DIR}/version.h | grep BUILD_NUMBER | cut -f3 -d' ') +OPENH323_MAJOR_VERSION=$(shell test -e ${OPENH323VERSIONFILE} && cat ${OPENH323VERSIONFILE} | grep MAJOR_VERSION | cut -f3 -d' ') +OPENH323_MINOR_VERSION=$(shell test -e ${OPENH323VERSIONFILE} && cat ${OPENH323VERSIONFILE} | grep MINOR_VERSION | cut -f3 -d' ') +OPENH323_BUILD_NUMBER=$(shell test -e ${OPENH323VERSIONFILE} && cat ${OPENH323VERSIONFILE} | grep BUILD_NUMBER | cut -f3 -d' ') OPENH323_VERSION="${OPENH323_MAJOR_VERSION}.${OPENH323_MINOR_VERSION}.${OPENH323_BUILD_NUMBER}" # @@ -66,8 +69,7 @@ samples: libchanh323.a: ast_h323.o - ar cr libchanh323.a ast_h323.o - touch ../chan_h323.c + ar cr $@ $< ast_h323.o: ast_h323.cpp $(CXX) -g -c -o $@ $(CFLAGS) $< @@ -94,7 +96,7 @@ depend: .depend checkversion: @echo -n "PWLib version is ${PWLIB_VERSION}... " - @if [ ${PWLIB_VERSION} == "1.8.1" ]; then \ + @if [ ${PWLIB_MAJOR_VERSION} -gt 1 -o ${PWLIB_MAJOR_VERSION} -eq 1 -a ${PWLIB_MINOR_VERSION} -gt 8 -o ${PWLIB_MAJOR_VERSION} -eq 1 -a ${PWLIB_MINOR_VERSION} -eq 8 -a ${PWLIB_BUILD_NUMBER} -ge 1 ]; then \ echo "ok" ; \ else \ echo "BAD" ; \ @@ -104,7 +106,7 @@ checkversion: exit 1 ; \ fi @echo -n "OpenH323 version is ${OPENH323_VERSION}... " - @if [ ${OPENH323_VERSION} == "1.15.1" ]; then \ + @if [ ${OPENH323_MAJOR_VERSION} -gt 1 -o ${OPENH323_MAJOR_VERSION} -eq 1 -a ${OPENH323_MINOR_VERSION} -gt 15 -o ${OPENH323_MAJOR_VERSION} -eq 1 -a ${OPENH323_MINOR_VERSION} -eq 15 -a ${OPENH323_BUILD_NUMBER} -ge 1 ]; then \ echo "ok" ; \ else \ echo "BAD" ; \ |