diff --git a/Makefile.am b/Makefile.am index 4e7a3d2318..2e24437ade 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,8 +3,6 @@ EXTRA_DIST = SUBDIRS = AUTOMAKE_OPTS = gnu foreign -AM_MAKE=`which gmake 2>/dev/null || which make 2>/dev/null || echo make` -MAKE=$(AM_MAKE) NAME=freeswitch PREFIX=$(prefix) APR_CONFIG=$(prefix)/bin/apr-1-config @@ -191,7 +189,7 @@ modules: $(NAME) @./build/addenv.sh build/freeswitch.env CFLAGS "-Werror $(AM_CFLAGS)" @./build/addenv.sh build/freeswitch.env CC "$(CC)" @./build/addenv.sh build/freeswitch.env CFGARGS "$(AM_CFGARGS)" - @cd src/mod && for i in `cat ../../modules.conf | grep -v \#` ; do echo making $$i ; $(PWD)/build/modmake.sh $(PWD) $$i || exit 1; done + @cd src/mod && for i in `cat ../../modules.conf | grep -v \#` ; do echo making $$i ; $(PWD)/build/modmake.sh $(MAKE) $(PWD) $$i || exit 1; done @rm -f build/freeswitch.env modclean: @@ -199,7 +197,7 @@ modclean: @./build/addenv.sh build/freeswitch.env MAKE "$(MAKE)" @./build/addenv.sh build/freeswitch.env CC "$(CC)" @./build/addenv.sh build/freeswitch.env DYNAMIC_LIB_EXTEN "$(DYNAMIC_LIB_EXTEN)" - @cd src/mod && for i in `find . -type d -name mod_\*` ; do echo making clean $$i ; $(PWD)/build/modmake.sh $(PWD) $$i clean || exit 1; done + @cd src/mod && for i in `find . -type d -name mod_\*` ; do echo making clean $$i ; $(PWD)/build/modmake.sh $(MAKE) $(PWD) $$i clean || exit 1; done @rm -f build/freeswitch.env everything: install install_mod @@ -231,7 +229,7 @@ install_mod: modules @./build/addenv.sh build/freeswitch.env LDFLAGS "$(AM_LDFLAGS) -lfreeswitch" @./build/addenv.sh build/freeswitch.env CFLAGS "-Werror $(AM_CFLAGS)" @./build/addenv.sh build/freeswitch.env CC "$(CC)" - @cd src/mod && for i in `cat ../../modules.conf | grep -v \#` ; do echo making install $$i ; $(PWD)/build/modmake.sh $(PWD) $$i install || exit 1; done + @cd src/mod && for i in `cat ../../modules.conf | grep -v \#` ; do echo making install $$i ; $(PWD)/build/modmake.sh $(MAKE) $(PWD) $$i install || exit 1; done @rm -f build/freeswitch.env @echo done diff --git a/Makefile.in b/Makefile.in index 8d60f7a4d8..8b165b5a81 100644 --- a/Makefile.in +++ b/Makefile.in @@ -243,8 +243,6 @@ target_alias = @target_alias@ EXTRA_DIST = SUBDIRS = AUTOMAKE_OPTS = gnu foreign -AM_MAKE = `which gmake 2>/dev/null || which make 2>/dev/null || echo make` -MAKE = $(AM_MAKE) NAME = freeswitch PREFIX = $(prefix) APR_CONFIG = $(prefix)/bin/apr-1-config @@ -1110,7 +1108,7 @@ modules: $(NAME) @./build/addenv.sh build/freeswitch.env CFLAGS "-Werror $(AM_CFLAGS)" @./build/addenv.sh build/freeswitch.env CC "$(CC)" @./build/addenv.sh build/freeswitch.env CFGARGS "$(AM_CFGARGS)" - @cd src/mod && for i in `cat ../../modules.conf | grep -v \#` ; do echo making $$i ; $(PWD)/build/modmake.sh $(PWD) $$i || exit 1; done + @cd src/mod && for i in `cat ../../modules.conf | grep -v \#` ; do echo making $$i ; $(PWD)/build/modmake.sh $(MAKE) $(PWD) $$i || exit 1; done @rm -f build/freeswitch.env modclean: @@ -1118,7 +1116,7 @@ modclean: @./build/addenv.sh build/freeswitch.env MAKE "$(MAKE)" @./build/addenv.sh build/freeswitch.env CC "$(CC)" @./build/addenv.sh build/freeswitch.env DYNAMIC_LIB_EXTEN "$(DYNAMIC_LIB_EXTEN)" - @cd src/mod && for i in `find . -type d -name mod_\*` ; do echo making clean $$i ; $(PWD)/build/modmake.sh $(PWD) $$i clean || exit 1; done + @cd src/mod && for i in `find . -type d -name mod_\*` ; do echo making clean $$i ; $(PWD)/build/modmake.sh $(MAKE) $(PWD) $$i clean || exit 1; done @rm -f build/freeswitch.env everything: install install_mod @@ -1150,7 +1148,7 @@ install_mod: modules @./build/addenv.sh build/freeswitch.env LDFLAGS "$(AM_LDFLAGS) -lfreeswitch" @./build/addenv.sh build/freeswitch.env CFLAGS "-Werror $(AM_CFLAGS)" @./build/addenv.sh build/freeswitch.env CC "$(CC)" - @cd src/mod && for i in `cat ../../modules.conf | grep -v \#` ; do echo making install $$i ; $(PWD)/build/modmake.sh $(PWD) $$i install || exit 1; done + @cd src/mod && for i in `cat ../../modules.conf | grep -v \#` ; do echo making install $$i ; $(PWD)/build/modmake.sh $(MAKE) $(PWD) $$i install || exit 1; done @rm -f build/freeswitch.env @echo done diff --git a/build/buildlib.sh b/build/buildlib.sh index cb8c43159c..b2fc4329f7 100755 --- a/build/buildlib.sh +++ b/build/buildlib.sh @@ -13,9 +13,9 @@ if [ -f $root/build/freeswitch.env ] ; then . $root/build/freeswitch.env fi -if [ -z $MAKE ] ; then +if [ -z "$MAKE" ] ; then make=`which gmake 2>/dev/null` - if [ -z $MAKE ] ; then + if [ -z "$MAKE" ] ; then make=make fi fi @@ -23,7 +23,7 @@ fi install= base=http://svn.freeswitch.org/downloads/libs -if [ ! -z $1 ] && [ $1 = install ] ; then +if [ ! -z "$1" ] && [ "$1" = install ] ; then install=1 shift fi diff --git a/build/modmake.sh b/build/modmake.sh index 3a93b9eea7..7eff7492e1 100755 --- a/build/modmake.sh +++ b/build/modmake.sh @@ -1,4 +1,7 @@ #!/bin/sh + +make=$1 +shift pwd=$1 shift mod=$1 @@ -8,14 +11,8 @@ if [ -f $pwd/build/freeswitch.env ] ; then . $pwd/build/freeswitch.env fi -make=`which gmake` - -if [ -z $make ] ; then - make=`which make` -fi - end=`echo $mod | sed "s/^.*\///g"` -if [ -z $end ] ; then +if [ -z "$end" ] ; then end=$mod fi diff --git a/libs/codec/g726/Makefile.am b/libs/codec/g726/Makefile.am index b81039d6db..268a6547dc 100644 --- a/libs/codec/g726/Makefile.am +++ b/libs/codec/g726/Makefile.am @@ -1,7 +1,6 @@ EXTRA_DIST = SUBDIRS = AUTOMAKE_OPTS= gnu -MAKE=gmake NAME=libg726 AM_CC=gcc diff --git a/libs/codec/g726/Makefile.in b/libs/codec/g726/Makefile.in index 8cf82abab8..44db06c54a 100644 --- a/libs/codec/g726/Makefile.in +++ b/libs/codec/g726/Makefile.in @@ -202,7 +202,6 @@ target_alias = @target_alias@ EXTRA_DIST = SUBDIRS = AUTOMAKE_OPTS = gnu -MAKE = gmake NAME = libg726 AM_CC = gcc AM_CFLAGS = -Wall -O3 -funroll-loops diff --git a/libs/codec/g7xx/Makefile.am b/libs/codec/g7xx/Makefile.am index 8b4ff71bab..938b0a744d 100644 --- a/libs/codec/g7xx/Makefile.am +++ b/libs/codec/g7xx/Makefile.am @@ -1,6 +1,5 @@ AM_CFLAGS = -I./src/include -fPIC -O3 -Dsingle -funroll-loops -fomit-frame-pointer AUTOMAKE_OPTS = gnu -MAKE = gmake NAME = libg7xx lib_LTLIBRARIES = libg7xx.la libg7xx_la_SOURCES = src/g711.c src/g722_decode.c src/g722_encode.c src/g726.c diff --git a/libs/codec/g7xx/Makefile.in b/libs/codec/g7xx/Makefile.in index 97843bc91a..0e54591ed8 100644 --- a/libs/codec/g7xx/Makefile.in +++ b/libs/codec/g7xx/Makefile.in @@ -193,7 +193,6 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_CFLAGS = -I./src/include -fPIC -O3 -Dsingle -funroll-loops -fomit-frame-pointer AUTOMAKE_OPTS = gnu -MAKE = gmake NAME = libg7xx lib_LTLIBRARIES = libg7xx.la libg7xx_la_SOURCES = src/g711.c src/g722_decode.c src/g722_encode.c src/g726.c diff --git a/libs/codec/gsm/Makefile.am b/libs/codec/gsm/Makefile.am index 1b1ecc231f..02144d5c10 100644 --- a/libs/codec/gsm/Makefile.am +++ b/libs/codec/gsm/Makefile.am @@ -1,7 +1,6 @@ EXTRA_DIST = SUBDIRS = AUTOMAKE_OPTS= gnu -MAKE=gmake NAME=libgsm AM_CC=gcc diff --git a/libs/codec/gsm/Makefile.in b/libs/codec/gsm/Makefile.in index 31a05284d1..8c34d0a103 100644 --- a/libs/codec/gsm/Makefile.in +++ b/libs/codec/gsm/Makefile.in @@ -204,7 +204,6 @@ target_alias = @target_alias@ EXTRA_DIST = SUBDIRS = AUTOMAKE_OPTS = gnu -MAKE = gmake NAME = libgsm AM_CC = gcc AM_CFLAGS = -I./inc -DNeedFunctionPrototypes=1 -funroll-loops -fPIC -DSASR -DNDEBUG -DWAV49 diff --git a/libs/codec/ilbc/Makefile.am b/libs/codec/ilbc/Makefile.am index 7e7a536fdd..931e216439 100644 --- a/libs/codec/ilbc/Makefile.am +++ b/libs/codec/ilbc/Makefile.am @@ -1,7 +1,6 @@ EXTRA_DIST = SUBDIRS = AUTOMAKE_OPTS= gnu -MAKE=gmake NAME=libilbc AM_CC=gcc diff --git a/libs/codec/ilbc/Makefile.in b/libs/codec/ilbc/Makefile.in index dadf027341..cc0cb822d6 100644 --- a/libs/codec/ilbc/Makefile.in +++ b/libs/codec/ilbc/Makefile.in @@ -209,7 +209,6 @@ target_alias = @target_alias@ EXTRA_DIST = SUBDIRS = AUTOMAKE_OPTS = gnu -MAKE = gmake NAME = libilbc AM_CC = gcc AM_CFLAGS = -Wall -O3 -funroll-loops diff --git a/libs/codec/lpc10/Makefile.am b/libs/codec/lpc10/Makefile.am index 052876cfd7..8a281120fb 100644 --- a/libs/codec/lpc10/Makefile.am +++ b/libs/codec/lpc10/Makefile.am @@ -1,7 +1,6 @@ EXTRA_DIST = SUBDIRS = AUTOMAKE_OPTS= gnu -MAKE=gmake NAME=libg7xx AM_CC=gcc diff --git a/libs/codec/lpc10/Makefile.in b/libs/codec/lpc10/Makefile.in index d3d3afb691..00dae6b49b 100644 --- a/libs/codec/lpc10/Makefile.in +++ b/libs/codec/lpc10/Makefile.in @@ -216,7 +216,6 @@ target_alias = @target_alias@ EXTRA_DIST = SUBDIRS = AUTOMAKE_OPTS = gnu -MAKE = gmake NAME = liblpc10 AM_CC = gcc AM_CFLAGS = -Wall -O3 -funroll-loops