FS-8776 #resolve Support GNU make parallel builds
* Explicitly define dependency tree for several modules * Enable parallel builds for libtiff and libspandsp * Verify module is enabled before attempting build. Allows the virtual targets to be used for ordering without forcing a build dependency.
This commit is contained in:
parent
41c73013e9
commit
28c23ab147
|
@ -5,10 +5,16 @@ clean: $(OUR_CLEAN_MODULES) $(OUR_DISABLED_CLEAN_MODULES)
|
||||||
install: $(OUR_INSTALL_MODULES)
|
install: $(OUR_INSTALL_MODULES)
|
||||||
uninstall: $(OUR_UNINSTALL_MODULES) $(OUR_DISABLED_UNINSTALL_MODULES)
|
uninstall: $(OUR_UNINSTALL_MODULES) $(OUR_DISABLED_UNINSTALL_MODULES)
|
||||||
|
|
||||||
|
mod_skypopen-all: mod_gsmopen-all
|
||||||
|
mod_gsmopen-all: mod_spandsp-all
|
||||||
|
mod_unimrcp-all: mod_sofia-all
|
||||||
|
|
||||||
$(OUR_MODULES) $(OUR_CLEAN_MODULES) $(OUR_INSTALL_MODULES) $(OUR_UNINSTALL_MODULES) $(OUR_DISABLED_MODULES) $(OUR_DISABLED_CLEAN_MODULES) $(OUR_DISABLED_INSTALL_MODULES) $(OUR_DISABLED_UNINSTALL_MODULES):
|
$(OUR_MODULES) $(OUR_CLEAN_MODULES) $(OUR_INSTALL_MODULES) $(OUR_UNINSTALL_MODULES) $(OUR_DISABLED_MODULES) $(OUR_DISABLED_CLEAN_MODULES) $(OUR_DISABLED_INSTALL_MODULES) $(OUR_DISABLED_UNINSTALL_MODULES):
|
||||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||||
target=`echo $@ | sed -e 's|^.*-||'`; \
|
target=`echo $@ | sed -e 's|^.*-||'`; \
|
||||||
modname=`echo $@ | sed -e 's|-.*||' | sed -e 's|^.*/||'`; \
|
modname=`echo $@ | sed -e 's|-.*||' | sed -e 's|^.*/||'`; \
|
||||||
|
enabled=`echo $(CONF_MODULES) | grep -w $$modname`; \
|
||||||
|
if ! test -z "$$enabled"; then \
|
||||||
confmoddir=`cat $(switch_builddir)/modules.conf | sed -e 's| ||' | grep $$modname$$ | sed -e 's|#||' | head -n 1`; \
|
confmoddir=`cat $(switch_builddir)/modules.conf | sed -e 's| ||' | grep $$modname$$ | sed -e 's|#||' | head -n 1`; \
|
||||||
if test -z "$$confmoddir" ; then \
|
if test -z "$$confmoddir" ; then \
|
||||||
moddir=$@ ; \
|
moddir=$@ ; \
|
||||||
|
@ -35,7 +41,8 @@ $(OUR_MODULES) $(OUR_CLEAN_MODULES) $(OUR_INSTALL_MODULES) $(OUR_UNINSTALL_MODUL
|
||||||
cd $$buildmoddir && MODDIR=$$moddir MODNAME=$$modname BASE=$(switch_builddir) $(MAKE) $(AM_MAKEFLAGS) -f $(switch_builddir)/build/modmake.rules $$target ;\
|
cd $$buildmoddir && MODDIR=$$moddir MODNAME=$$modname BASE=$(switch_builddir) $(MAKE) $(AM_MAKEFLAGS) -f $(switch_builddir)/build/modmake.rules $$target ;\
|
||||||
fi;) || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
fi;) || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||||
fi; \
|
fi; \
|
||||||
test -z "$$fail" ;
|
test -z "$$fail" ; \
|
||||||
|
fi;
|
||||||
|
|
||||||
mod_com_g729-activate:
|
mod_com_g729-activate:
|
||||||
cd $(switch_builddir)/src/mod/codecs/mod_com_g729 && $(MAKE) $(AM_MAKEFLAGS) activate
|
cd $(switch_builddir)/src/mod/codecs/mod_com_g729 && $(MAKE) $(AM_MAKEFLAGS) activate
|
||||||
|
|
|
@ -16,9 +16,9 @@ mod_spandsp_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(SPANDSP_LA) $(TI
|
||||||
mod_spandsp_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
mod_spandsp_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||||
|
|
||||||
$(SPANDSP_LA): $(TIFF_LA) $(SPANDSP_DIR) $(SPANDSP_DIR)/.update
|
$(SPANDSP_LA): $(TIFF_LA) $(SPANDSP_DIR) $(SPANDSP_DIR)/.update
|
||||||
cd $(SPANDSP_BUILDDIR) && $(MAKE) -j1 CPPFLAGS="$(CPPFLAGS) -I$(TIFF_BUILDDIR)/libtiff -I$(TIFF_DIR)/libtiff" CFLAGS="$(CFLAGS)"
|
cd $(SPANDSP_BUILDDIR) && $(MAKE) CPPFLAGS="$(CPPFLAGS) -I$(TIFF_BUILDDIR)/libtiff -I$(TIFF_DIR)/libtiff" CFLAGS="$(CFLAGS)"
|
||||||
$(TOUCH_TARGET)
|
$(TOUCH_TARGET)
|
||||||
|
|
||||||
$(TIFF_LA): $(TIFF_DIR) $(TIFF_DIR)/.update
|
$(TIFF_LA): $(TIFF_DIR) $(TIFF_DIR)/.update
|
||||||
cd $(TIFF_BUILDDIR) && $(MAKE) -j1
|
cd $(TIFF_BUILDDIR) && $(MAKE)
|
||||||
$(TOUCH_TARGET)
|
$(TOUCH_TARGET)
|
||||||
|
|
|
@ -19,9 +19,9 @@ mod_gsmopen_la_LDFLAGS = -avoid-version -module -no-undefined -lctb-0.16 -lgsmm
|
||||||
BUILT_SOURCES = $(TIFF_LA) $(SPANDSP_LA)
|
BUILT_SOURCES = $(TIFF_LA) $(SPANDSP_LA)
|
||||||
|
|
||||||
$(SPANDSP_LA): $(TIFF_LA) $(SPANDSP_DIR) $(SPANDSP_DIR)/.update
|
$(SPANDSP_LA): $(TIFF_LA) $(SPANDSP_DIR) $(SPANDSP_DIR)/.update
|
||||||
cd $(SPANDSP_BUILDDIR) && $(MAKE) -j1 CPPFLAGS="$(CPPFLAGS) -I$(TIFF_BUILDDIR)/libtiff -I$(TIFF_DIR)/libtiff" CFLAGS="$(CFLAGS)"
|
cd $(SPANDSP_BUILDDIR) && $(MAKE) CPPFLAGS="$(CPPFLAGS) -I$(TIFF_BUILDDIR)/libtiff -I$(TIFF_DIR)/libtiff" CFLAGS="$(CFLAGS)"
|
||||||
$(TOUCH_TARGET)
|
$(TOUCH_TARGET)
|
||||||
|
|
||||||
$(TIFF_LA): $(TIFF_DIR) $(TIFF_DIR)/.update
|
$(TIFF_LA): $(TIFF_DIR) $(TIFF_DIR)/.update
|
||||||
cd $(TIFF_BUILDDIR) && $(MAKE) -j1
|
cd $(TIFF_BUILDDIR) && $(MAKE)
|
||||||
$(TOUCH_TARGET)
|
$(TOUCH_TARGET)
|
||||||
|
|
|
@ -19,9 +19,9 @@ mod_skypopen_la_LDFLAGS = -avoid-version -module -no-undefined -shared -lX11
|
||||||
BUILT_SOURCES = $(TIFF_LA) $(SPANDSP_LA)
|
BUILT_SOURCES = $(TIFF_LA) $(SPANDSP_LA)
|
||||||
|
|
||||||
$(SPANDSP_LA): $(TIFF_LA) $(SPANDSP_DIR) $(SPANDSP_DIR)/.update
|
$(SPANDSP_LA): $(TIFF_LA) $(SPANDSP_DIR) $(SPANDSP_DIR)/.update
|
||||||
cd $(SPANDSP_BUILDDIR) && $(MAKE) -j1 CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS) -I$(TIFF_BUILDDIR)/libtiff -I$(TIFF_DIR)/libtiff"
|
cd $(SPANDSP_BUILDDIR) && $(MAKE) CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS) -I$(TIFF_BUILDDIR)/libtiff -I$(TIFF_DIR)/libtiff"
|
||||||
$(TOUCH_TARGET)
|
$(TOUCH_TARGET)
|
||||||
|
|
||||||
$(TIFF_LA): $(TIFF_DIR) $(TIFF_DIR)/.update
|
$(TIFF_LA): $(TIFF_DIR) $(TIFF_DIR)/.update
|
||||||
cd $(TIFF_BUILDDIR) && $(MAKE) -j1
|
cd $(TIFF_BUILDDIR) && $(MAKE)
|
||||||
$(TOUCH_TARGET)
|
$(TOUCH_TARGET)
|
||||||
|
|
Loading…
Reference in New Issue