[Freeswitch-svn] [commit] r4840 - in freeswitch/trunk: . src/mod

Freeswitch SVN mikej at freeswitch.org
Tue Apr 3 06:53:47 EDT 2007


Author: mikej
Date: Tue Apr  3 06:53:47 2007
New Revision: 4840

Modified:
   freeswitch/trunk/Makefile.am
   freeswitch/trunk/src/mod/Makefile.am

Log:
add auto generated mod_* targets (generated from modules.conf.  A step towards make -j support for the module builds.

Modified: freeswitch/trunk/Makefile.am
==============================================================================
--- freeswitch/trunk/Makefile.am	(original)
+++ freeswitch/trunk/Makefile.am	Tue Apr  3 06:53:47 2007
@@ -113,7 +113,7 @@
 MOD_LINK       = $(BASE)/libfreeswitch.la
 
 CLEANFILES     = src/include/switch_version.h
-BUILT_SOURCES  = src/include/switch_version.h
+BUILT_SOURCES  = src/include/switch_version.h ./$(DEPDIR)/modules.targets
 
 bin_PROGRAMS = freeswitch
 freeswitch_SOURCES = src/switch.c
@@ -122,7 +122,7 @@
 freeswitch_LDFLAGS = $(AM_LDFLAGS) -rpath $(libdir)
 freeswitch_LDADD = libfreeswitch.la libs/apr/libapr-1.la
 
-$(libfreeswitch_la_SOURCES): $(CORE_LIBS) $(switch_builddir)/quiet_libtool
+$(libfreeswitch_la_SOURCES): $(CORE_LIBS) $(switch_builddir)/quiet_libtool modules.conf
 
 $(switch_builddir)/quiet_libtool: $(switch_builddir)/libtool
 	@cat libtool | sed -e 's|$$show "$$command"|if test -z "$$suppress_output" ; then $$show "Compiling $$srcfile ..." ; fi|' > quiet_libtool
@@ -239,6 +239,19 @@
 megaclean: eclean modclean
 	rm -f `find ./libs -name \*.la`
 
+ at am__include@ @am__quote at ./$(DEPDIR)/modules.targets at am__quote@
+
+modules.conf:
+	if test -f $@; then touch $@; else cp build/modules.conf.in $@ 
+
+./$(DEPDIR)/modules.targets: modules.conf
+	mods=`cat modules.conf | sed -e 's|^.*/||'`; echo MODULE_TARGETS=\"$$mods\" > ./$(DEPDIR)/modules.targets
+
+$(MODULE_TARGETS):
+	@set fnord $$MAKEFLAGS; amf=$$2; \
+	(cd src/mod && $(MAKE) $(AM_MAKEFLAGS) $@) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	test -z "$$fail"
 
 # Special targets
 

Modified: freeswitch/trunk/src/mod/Makefile.am
==============================================================================
--- freeswitch/trunk/src/mod/Makefile.am	(original)
+++ freeswitch/trunk/src/mod/Makefile.am	Tue Apr  3 06:53:47 2007
@@ -76,3 +76,15 @@
 	@echo
 	@echo done Uninstalling Modules
 
+
+ at am__include@ @am__quote@$(switch_builddir)/$(DEPDIR)/modules.targets at am__quote@
+
+$(MODULE_TARGETS):
+	@set fnord $$MAKEFLAGS; amf=$$2; \
+	moddir=`grep $@ $(switch_builddir)/modules.conf | sed -e 's|#||'` ; \
+	(if test -f $$moddir/Makefile ; then \
+		cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) $(AM_MAKEFLAGS); else\
+		cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) $(AM_MAKEFLAGS) -f $(switch_builddir)/build/modmake.rules;\
+	fi;)\
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	test -z "$$fail"



More information about the Freeswitch-svn mailing list