diff --git a/Makefile.am b/Makefile.am index 77c000188f..93cb49ea2b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -13,6 +13,7 @@ OSARCH=`uname -s` LIBTOOL=$(switch_builddir)/libtool LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL) TOUCH_TARGET=if test -f "$@" ; then touch "$@" ; fi ; +AM_MAKEFLAGS=`if test -z "$(VERBOSE)" ; then $(MAKE) --help | grep silent | grep "\-s"> /dev/null && echo -s;fi` if CRASHPROT AM_CFLAGS += -DCRASH_PROT @@ -188,20 +189,20 @@ sure: clean modwipe uninstall installall wayclean: clean modules: libfreeswitch.la - @cd src/mod && $(MAKE) + @cd src/mod && $(MAKE) $(AM_MAKEFLAGS) install_mod: libfreeswitch.la - @cd src/mod && $(MAKE) install + @cd src/mod && $(MAKE) $(AM_MAKEFLAGS) install mod_install: install_mod uninstall_mod: - @cd src/mod && $(MAKE) uninstall + @cd src/mod && $(MAKE) $(AM_MAKEFLAGS) uninstall mod_uninstall: uninstall_mod modclean: - @cd src/mod && $(MAKE) clean + cd src/mod && $(MAKE) $(AM_MAKEFLAGS) clean modwipe: rm -f $(PREFIX)/mod/*.${DYNAMIC_LIB_EXTEN} diff --git a/Makefile.in b/Makefile.in index e5be05c931..a59b2f79dd 100644 --- a/Makefile.in +++ b/Makefile.in @@ -300,6 +300,7 @@ BASE = $(switch_srcdir) OSARCH = `uname -s` LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL) TOUCH_TARGET = if test -f "$@" ; then touch "$@" ; fi ; +AM_MAKEFLAGS = `if test -z "$(VERBOSE)" ; then $(MAKE) --help | grep silent | grep "\-s"> /dev/null && echo -s;fi` libfreeswitch_la_SOURCES = \ src/switch_apr.c \ src/switch_buffer.c \ @@ -1177,20 +1178,20 @@ sure: clean modwipe uninstall installall wayclean: clean modules: libfreeswitch.la - @cd src/mod && $(MAKE) + @cd src/mod && $(MAKE) $(AM_MAKEFLAGS) install_mod: libfreeswitch.la - @cd src/mod && $(MAKE) install + @cd src/mod && $(MAKE) $(AM_MAKEFLAGS) install mod_install: install_mod uninstall_mod: - @cd src/mod && $(MAKE) uninstall + @cd src/mod && $(MAKE) $(AM_MAKEFLAGS) uninstall mod_uninstall: uninstall_mod modclean: - @cd src/mod && $(MAKE) clean + cd src/mod && $(MAKE) $(AM_MAKEFLAGS) clean modwipe: rm -f $(PREFIX)/mod/*.${DYNAMIC_LIB_EXTEN} diff --git a/build/modmake.rules.in b/build/modmake.rules.in index 88fdf83626..0152730040 100644 --- a/build/modmake.rules.in +++ b/build/modmake.rules.in @@ -48,6 +48,7 @@ CSOURCEFILE=$(MODNAME).c CXXSOURCEFILE=$(MODNAME).cpp TOUCH_TARGET=if test -f "$@" ; then touch "$@" ; fi ; +MAKE_OPTS = `if test -z "$(VERBOSE)" ; then $(MAKE) --help | grep silent | grep "\-s"> /dev/null && echo -s;fi` RECURSE_MODNAME=`pwd | sed -e 's|^.*/||'` RECURSE_SOURCEFILE=`if test -f $$modname.cpp; then echo $$modname.cpp; else echo $$modname.c; fi` RECURSE_OUR_DEPS=`test -z "$(WANT_CURL)" || if test ! -z "$(LIBCURL_DEPS)"; then echo $(CURLLA); fi` @@ -59,7 +60,7 @@ RECURSE_MAKE=modname="$(RECURSE_MODNAME)" ; \ ourdefs="$(RECURSE_OUR_DEPS)" ; \ ourcflags="$(RECURSE_OUR_CFLAGS)" ; \ ourldflags="$(RECURSE_OUR_LDFLAGS)" ; \ - $(MAKE) MODNAME="$$modname" SOURCEFILE="$$sourcefile" OUR_DEPS="$$ourdefs" OUR_CFLAGS="$$ourcflags" OUR_LDFLAGS="$$ourldflags" + $(MAKE) $(MAKE_OPTS) MODNAME="$$modname" SOURCEFILE="$$sourcefile" OUR_DEPS="$$ourdefs" OUR_CFLAGS="$$ourcflags" OUR_LDFLAGS="$$ourldflags" all: Makefile @$(RECURSE_MAKE) all-modules || exit 1 diff --git a/src/mod/Makefile.am b/src/mod/Makefile.am index 0f67551e77..089ce87e76 100644 --- a/src/mod/Makefile.am +++ b/src/mod/Makefile.am @@ -6,6 +6,7 @@ OUR_CLEAN_MODULES=if test -z "$(MODULES)" ; then tmp_clean_modules=`echo $$conf_ else our_clean_modules=$(MODULES) ; fi ; MOD_NAME=`echo $$i | sed -e 's|^.*/||'` MOD_DIR=`if test -d $(switch_srcdir)/src/mod/$$i ; then echo $(switch_srcdir)/src/mod/$$i ; else echo $$i ; fi;` +AM_MAKEFLAGS = `if test -z "$(VERBOSE)" ; then $(MAKE) --help | grep silent | grep "\-s"> /dev/null && echo -s;fi` all: @$(CONF_MODULES) \ @@ -17,8 +18,8 @@ all: echo making $$i ; \ moddir=$(MOD_DIR); \ if test -f $$moddir/Makefile ; then \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) || exit 1; else \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules || exit 1; \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) $(AM_MAKEFLAGS) || exit 1; else \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) $(AM_MAKEFLAGS) -f $(switch_builddir)/build/modmake.rules || exit 1; \ fi; \ done @echo @@ -35,8 +36,8 @@ clean: echo making clean $$i ; \ moddir=$(MOD_DIR); \ if test -f $$moddir/Makefile ; then \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) clean || exit 1; else \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules clean || exit 1; \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) $(AM_MAKEFLAGS) clean || exit 1; else \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) $(AM_MAKEFLAGS) -f $(switch_builddir)/build/modmake.rules clean || exit 1; \ fi; \ done @echo @@ -52,8 +53,8 @@ install: echo making install $$i ; \ moddir=$(MOD_DIR); \ if test -f $$moddir/Makefile ; then \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) install || exit 1; else \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules install || exit 1; \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) $(AM_MAKEFLAGS) install || exit 1; else \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) $(AM_MAKEFLAGS) -f $(switch_builddir)/build/modmake.rules install || exit 1; \ fi; \ done @echo @@ -69,8 +70,8 @@ uninstall: echo making uninstall $$i ; \ moddir=$(MOD_DIR); \ if test -f $$moddir/Makefile ; then \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) uninstall || exit 1; else \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules uninstall || exit 1; \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) $(AM_MAKEFLAGS) uninstall || exit 1; else \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) $(AM_MAKEFLAGS) -f $(switch_builddir)/build/modmake.rules uninstall || exit 1; \ fi; \ done @echo diff --git a/src/mod/Makefile.in b/src/mod/Makefile.in index 37b8fe840f..8e5af53f9d 100644 --- a/src/mod/Makefile.in +++ b/src/mod/Makefile.in @@ -201,6 +201,7 @@ OUR_CLEAN_MODULES = if test -z "$(MODULES)" ; then tmp_clean_modules=`echo $$con MOD_NAME = `echo $$i | sed -e 's|^.*/||'` MOD_DIR = `if test -d $(switch_srcdir)/src/mod/$$i ; then echo $(switch_srcdir)/src/mod/$$i ; else echo $$i ; fi;` +AM_MAKEFLAGS = `if test -z "$(VERBOSE)" ; then $(MAKE) --help | grep silent | grep "\-s"> /dev/null && echo -s;fi` all: all-am .SUFFIXES: @@ -368,8 +369,8 @@ all: echo making $$i ; \ moddir=$(MOD_DIR); \ if test -f $$moddir/Makefile ; then \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) || exit 1; else \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules || exit 1; \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) $(AM_MAKEFLAGS) || exit 1; else \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) $(AM_MAKEFLAGS) -f $(switch_builddir)/build/modmake.rules || exit 1; \ fi; \ done @echo @@ -386,8 +387,8 @@ clean: echo making clean $$i ; \ moddir=$(MOD_DIR); \ if test -f $$moddir/Makefile ; then \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) clean || exit 1; else \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules clean || exit 1; \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) $(AM_MAKEFLAGS) clean || exit 1; else \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) $(AM_MAKEFLAGS) -f $(switch_builddir)/build/modmake.rules clean || exit 1; \ fi; \ done @echo @@ -403,8 +404,8 @@ install: echo making install $$i ; \ moddir=$(MOD_DIR); \ if test -f $$moddir/Makefile ; then \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) install || exit 1; else \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules install || exit 1; \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) $(AM_MAKEFLAGS) install || exit 1; else \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) $(AM_MAKEFLAGS) -f $(switch_builddir)/build/modmake.rules install || exit 1; \ fi; \ done @echo @@ -420,8 +421,8 @@ uninstall: echo making uninstall $$i ; \ moddir=$(MOD_DIR); \ if test -f $$moddir/Makefile ; then \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) uninstall || exit 1; else \ - cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules uninstall || exit 1; \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) $(AM_MAKEFLAGS) uninstall || exit 1; else \ + cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) $(AM_MAKEFLAGS) -f $(switch_builddir)/build/modmake.rules uninstall || exit 1; \ fi; \ done @echo