[asterisk-commits] wdoekes: trunk r384989 - in /trunk: ./ build_tools/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Apr 8 13:24:54 CDT 2013
Author: wdoekes
Date: Mon Apr 8 13:24:50 2013
New Revision: 384989
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=384989
Log:
Clean up Makefile "warning" clutter when makeopts doesn't exist.
Review: https://reviewboard.asterisk.org/r/2304
Modified:
trunk/Makefile
trunk/build_tools/make_buildopts_h
trunk/build_tools/make_linker_version_script
trunk/build_tools/make_version
trunk/build_tools/mkpkgconfig
Modified: trunk/Makefile
URL: http://svnview.digium.com/svn/asterisk/trunk/Makefile?view=diff&rev=384989&r1=384988&r2=384989
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Mon Apr 8 13:24:50 2013
@@ -81,6 +81,8 @@
# should go directly to ASTLDFLAGS
#--- paths to various commands
+# The makeopts include below tries to set these if they're found during
+# configure.
export CC
export CXX
export AR
@@ -221,10 +223,13 @@
_ASTCFLAGS+=-Wcast-align -DSOLARIS -I../include/solaris-compat -I/opt/ssl/include -I/usr/local/ssl/include -D_XPG4_2 -D__EXTENSIONS__
endif
-ASTERISKVERSION:=$(shell GREP=$(GREP) AWK=$(AWK) GIT=$(GIT) build_tools/make_version .)
-
-ifneq ($(wildcard .version),)
- ASTERISKVERSIONNUM:=$(shell $(AWK) -F. '{printf "%01d%02d%02d", $$1, $$2, $$3}' .version)
+ifneq ($(GREP),)
+ ASTERISKVERSION:=$(shell GREP=$(GREP) AWK=$(AWK) GIT=$(GIT) build_tools/make_version .)
+endif
+ifneq ($(AWK),)
+ ifneq ($(wildcard .version),)
+ ASTERISKVERSIONNUM:=$(shell $(AWK) -F. '{printf "%01d%02d%02d", $$1, $$2, $$3}' .version)
+ endif
endif
ifneq ($(wildcard .svn),)
@@ -450,7 +455,11 @@
done
$(MAKE) -C sounds install
-doc/core-en_US.xml: makeopts cleantest $(foreach dir,$(MOD_SUBDIRS),$(shell $(GREP) -l "language=\"en_US\"" $(dir)/*.c $(dir)/*.cc 2>/dev/null))
+ifneq ($(GREP),)
+ XML_core_en_US = $(foreach dir,$(MOD_SUBDIRS),$(shell $(GREP) -l "language=\"en_US\"" $(dir)/*.c $(dir)/*.cc 2>/dev/null))
+endif
+
+doc/core-en_US.xml: makeopts cleantest $(XML_core_en_US)
@printf "Building Documentation For: "
@echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > $@
@echo "<!DOCTYPE docs SYSTEM \"appdocsxml.dtd\">" >> $@
@@ -464,7 +473,11 @@
@echo
@echo "</docs>" >> $@
-doc/full-en_US.xml: makeopts cleantest $(foreach dir,$(MOD_SUBDIRS),$(shell $(GREP) -l "language=\"en_US\"" $(dir)/*.c $(dir)/*.cc 2>/dev/null))
+ifneq ($(GREP),)
+ XMX_full_en_US = $(foreach dir,$(MOD_SUBDIRS),$(shell $(GREP) -l "language=\"en_US\"" $(dir)/*.c $(dir)/*.cc 2>/dev/null))
+endif
+
+doc/full-en_US.xml: makeopts cleantest $(XML_full_en_US)
ifeq ($(PYTHON),:)
@echo "--------------------------------------------------------------------------"
@echo "--- Please install python to build full documentation ---"
Modified: trunk/build_tools/make_buildopts_h
URL: http://svnview.digium.com/svn/asterisk/trunk/build_tools/make_buildopts_h?view=diff&rev=384989&r1=384988&r2=384989
==============================================================================
--- trunk/build_tools/make_buildopts_h (original)
+++ trunk/build_tools/make_buildopts_h Mon Apr 8 13:24:50 2013
@@ -1,4 +1,7 @@
#!/bin/sh
+
+GREP=${GREP:-grep}
+MD5=${MD5:-md5sum}
cat << END
/*
Modified: trunk/build_tools/make_linker_version_script
URL: http://svnview.digium.com/svn/asterisk/trunk/build_tools/make_linker_version_script?view=diff&rev=384989&r1=384988&r2=384989
==============================================================================
--- trunk/build_tools/make_linker_version_script (original)
+++ trunk/build_tools/make_linker_version_script Mon Apr 8 13:24:50 2013
@@ -1,5 +1,6 @@
#!/bin/sh
+
+AWK=${AWK:-awk}
test -f ${1}.exports.in && ${AWK} "{sub(\"LINKER_SYMBOL_PREFIX\", \"${2}\"); print;}" ${1}.exports.in > ${1}.exports && exit 0
test -f ${1}.exports.in || rm -f ${1}.exports && cp ${3}/default.exports ${1}.exports && exit 0
-
Modified: trunk/build_tools/make_version
URL: http://svnview.digium.com/svn/asterisk/trunk/build_tools/make_version?view=diff&rev=384989&r1=384988&r2=384989
==============================================================================
--- trunk/build_tools/make_version (original)
+++ trunk/build_tools/make_version Mon Apr 8 13:24:50 2013
@@ -1,4 +1,8 @@
#!/bin/sh
+
+AWK=${AWK:-awk}
+GIT=${GIT:-git}
+GREP=${GREP:-grep}
if [ -f ${1}/.version ]; then
cat ${1}/.version
@@ -92,7 +96,7 @@
# If the first log commit messages indicates that this is checked into
# subversion, we'll just use the SVN- form of the revision.
MODIFIED=""
- SVN_REV=`${GIT} log --pretty=full -1 | grep -F "git-svn-id:" | sed -e "s/.*\@\([^\s]*\)\s.*/\1/g"`
+ SVN_REV=`${GIT} log --pretty=full -1 | ${GREP} -F "git-svn-id:" | sed -e "s/.*\@\([^\s]*\)\s.*/\1/g"`
if [ -z "$SVN_REV" ]; then
VERSION=GIT-`${GIT} describe --long --always --tags --dirty=M 2> /dev/null`
if [ $? -ne 0 ]; then
@@ -105,7 +109,7 @@
fi
echo ${VERSION}
else
- PARTS=`LANG=C ${GIT} log --pretty=full | grep -F "git-svn-id:" | head -1 | awk '{print $2;}' | sed -e s:^.*/svn/$2/:: | sed -e 's:/: :g' | sed -e 's/@.*$//g'`
+ PARTS=`LANG=C ${GIT} log --pretty=full | ${GREP} -F "git-svn-id:" | head -1 | ${AWK} '{print $2;}' | sed -e s:^.*/svn/$2/:: | sed -e 's:/: :g' | sed -e 's/@.*$//g'`
BRANCH=0
TEAM=0
TAG=0
Modified: trunk/build_tools/mkpkgconfig
URL: http://svnview.digium.com/svn/asterisk/trunk/build_tools/mkpkgconfig?view=diff&rev=384989&r1=384988&r2=384989
==============================================================================
--- trunk/build_tools/mkpkgconfig (original)
+++ trunk/build_tools/mkpkgconfig Mon Apr 8 13:24:50 2013
@@ -1,5 +1,6 @@
#!/bin/sh
PPATH="$1"
+GREP=${GREP:-grep}
## Make sure we were called from Makefile
if [ "x$ASTERISKVERSIONNUM" = "x" ]; then
More information about the asterisk-commits
mailing list