[asterisk-commits] kpfleming: branch kpfleming/multimodule-build r103665 - in /team/kpfleming/mu...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Feb 13 18:06:15 CST 2008


Author: kpfleming
Date: Wed Feb 13 18:06:14 2008
New Revision: 103665

URL: http://svn.digium.com/view/asterisk?view=rev&rev=103665
Log:
commit work in progress... multi-component module build are still not working, but there has been a lot of simplification and a bit of reorganization of the Makefiles for module subdirectories

Added:
    team/kpfleming/multimodule-build/Makefile.moddir
      - copied, changed from r103662, team/kpfleming/multimodule-build/Makefile.moddir_rules
Removed:
    team/kpfleming/multimodule-build/Makefile.moddir_rules
Modified:
    team/kpfleming/multimodule-build/Makefile
    team/kpfleming/multimodule-build/Makefile.rules
    team/kpfleming/multimodule-build/apps/Makefile
    team/kpfleming/multimodule-build/cdr/Makefile
    team/kpfleming/multimodule-build/channels/Makefile
    team/kpfleming/multimodule-build/codecs/Makefile
    team/kpfleming/multimodule-build/formats/Makefile
    team/kpfleming/multimodule-build/funcs/Makefile
    team/kpfleming/multimodule-build/main/Makefile
    team/kpfleming/multimodule-build/main/minimime/Makefile
    team/kpfleming/multimodule-build/pbx/Makefile
    team/kpfleming/multimodule-build/res/Makefile
    team/kpfleming/multimodule-build/tests/Makefile

Modified: team/kpfleming/multimodule-build/Makefile
URL: http://svn.digium.com/view/asterisk/team/kpfleming/multimodule-build/Makefile?view=diff&rev=103665&r1=103664&r2=103665
==============================================================================
--- team/kpfleming/multimodule-build/Makefile (original)
+++ team/kpfleming/multimodule-build/Makefile Wed Feb 13 18:06:14 2008
@@ -3,9 +3,7 @@
 # 
 # Top level Makefile
 #
-# Copyright (C) 1999-2006, Digium, Inc.
-#
-# Mark Spencer <markster at digium.com>
+# Copyright (C) 1999 - 2008, Digium, Inc.
 #
 # This program is free software, distributed under the terms of
 # the GNU General Public License
@@ -73,12 +71,16 @@
 export NOISY_BUILD		# Used in Makefile.rules
 export MENUSELECT_CFLAGS	# Options selected in menuselect.
 export AST_DEVMODE		# Set to "yes" for additional compiler
-				# and runtime checks
+                                # and runtime checks
 
 export SOLINK			# linker flags for shared objects
 export STATIC_BUILD		# Additional cflags, set to -static
-				# for static builds. Probably
-				# should go directly to ASTLDFLAGS
+                                # for static builds. Probably
+                                # should go directly to ASTLDFLAGS
+
+export NORMAL_SUBMAKE
+export SILENT_SUBMAKE
+export SUBMAKE
 
 #--- paths to various commands
 export CC
@@ -276,17 +278,20 @@
   ASTERISKVERSIONNUM:=999999
 endif
 
-# XXX MALLOC_DEBUG is probably unused, Makefile.moddir_rules adds the
+# XXX MALLOC_DEBUG is probably unused, Makefile.moddir adds the
 #	value directly to ASTCFLAGS
 ASTCFLAGS+=$(MALLOC_DEBUG)$(OPTIONS)
 
 MOD_SUBDIRS:=channels pbx apps codecs formats cdr funcs tests main res $(LOCAL_MOD_SUBDIRS)
 OTHER_SUBDIRS:=utils agi
-SUBDIRS:=$(OTHER_SUBDIRS) $(MOD_SUBDIRS)
-SUBDIRS_INSTALL:=$(SUBDIRS:%=%-install)
-SUBDIRS_CLEAN:=$(SUBDIRS:%=%-clean)
-SUBDIRS_DIST_CLEAN:=$(SUBDIRS:%=%-dist-clean)
-SUBDIRS_UNINSTALL:=$(SUBDIRS:%=%-uninstall)
+MOD_SUBDIRS_INSTALL:=$(MOD_SUBDIRS:%=%-install)
+OTHER_SUBDIRS_INSTALL:=$(OTHER_SUBDIRS:%=%-install)
+MOD_SUBDIRS_CLEAN:=$(MOD_SUBDIRS:%=%-clean)
+OTHER_SUBDIRS_CLEAN:=$(OTHER_SUBDIRS:%=%-clean)
+MOD_SUBDIRS_DIST_CLEAN:=$(MOD_SUBDIRS:%=%-dist-clean)
+OTHER_SUBDIRS_DIST_CLEAN:=$(OTHER_SUBDIRS:%=%-dist-clean)
+MOD_SUBDIRS_UNINSTALL:=$(MOD_SUBDIRS:%=%-uninstall)
+OTHER_SUBDIRS_UNINSTALL:=$(OTHER_SUBDIRS:%=%-uninstall)
 MOD_SUBDIRS_EMBED_LDSCRIPT:=$(MOD_SUBDIRS:%=%-embed-ldscript)
 MOD_SUBDIRS_EMBED_LDFLAGS:=$(MOD_SUBDIRS:%=%-embed-ldflags)
 MOD_SUBDIRS_EMBED_LIBS:=$(MOD_SUBDIRS:%=%-embed-libs)
@@ -310,12 +315,9 @@
 # comment to print directories during submakes
 #PRINT_DIR=yes
 
-SILENTMAKE:=$(MAKE) --quiet --no-print-directory
-ifneq ($(PRINT_DIR)$(NOISY_BUILD),)
-SUBMAKE:=$(MAKE) --quiet
-else
-SUBMAKE:=$(MAKE) --quiet --no-print-directory
-endif
+NORMAL_SUBMAKE=$(MAKE)
+SILENT_SUBMAKE=$(MAKE) --quiet $(if $(strip $(PRINT_DIR)),--print-directory)
+SUBMAKE:=$(if $(strip $(NOISY_BUILD)),$(NORMAL_SUBMAKE),$(SILENT_SUBMAKE))
 
 # This is used when generating the doxygen documentation
 ifneq ($(DOT),:)
@@ -341,7 +343,7 @@
 	@echo " +               $(mK) install               +"  
 	@echo " +-------------------------------------------+"  
 
-_all: cleantest makeopts $(SUBDIRS)
+_all: cleantest makeopts $(MOD_SUBDIRS) $(OTHER_SUBDIRS)
 
 makeopts: configure
 	@echo "****"
@@ -353,27 +355,29 @@
 menuselect.makeopts: menuselect/menuselect menuselect-tree
 	menuselect/menuselect --check-deps $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) menuselect.makeopts
 
+mod_subdir_make=$($(1)) --no-builtin-rules -C $(@:-$(2)=) -f $(ASTTOPDIR)/Makefile.moddir SUBDIR=$(@:-$(2)=) $(if $(strip $(3)),$(3),$(2))
+other_subdir_make=$($(1)) --no-builtin-rules -C $(@:-$(2)=) SUBDIR=$(@:-$(2)=) $(if $(strip $(3)),$(3),$(2))
+
 $(MOD_SUBDIRS_EMBED_LDSCRIPT):
-	@echo "EMBED_LDSCRIPTS+="`$(SILENTMAKE) -C $(@:-embed-ldscript=) SUBDIR=$(@:-embed-ldscript=) __embed_ldscript` >> makeopts.embed_rules
+	@+echo "EMBED_LDSCRIPTS+="`$(call mod_subdir_make,SILENT_SUBMAKE,embed-ldscript,__embed_ldscript)` >> makeopts.embed_rules
 
 $(MOD_SUBDIRS_EMBED_LDFLAGS):
-	@echo "EMBED_LDFLAGS+="`$(SILENTMAKE) -C $(@:-embed-ldflags=) SUBDIR=$(@:-embed-ldflags=) __embed_ldflags` >> makeopts.embed_rules
+	@+echo "EMBED_LDFLAGS+="`$(call mod_subdir_make,SILENT_SUBMAKE,embed-ldflags,__embed_ldflags)` >> makeopts.embed_rules
 
 $(MOD_SUBDIRS_EMBED_LIBS):
-	@echo "EMBED_LIBS+="`$(SILENTMAKE) -C $(@:-embed-libs=) SUBDIR=$(@:-embed-libs=) __embed_libs` >> makeopts.embed_rules
+	@+echo "EMBED_LIBS+="`$(call mod_subdir_make,SILENT_SUBMAKE,embed-libs,__embed_libs)` >> makeopts.embed_rules
 
 $(MOD_SUBDIRS_MENUSELECT_TREE):
-	@$(SUBMAKE) -C $(@:-menuselect-tree=) SUBDIR=$(@:-menuselect-tree=) moduleinfo
-	@$(SUBMAKE) -C $(@:-menuselect-tree=) SUBDIR=$(@:-menuselect-tree=) makeopts
+	@+$(call mod_subdir_make,SUBMAKE,menuselect-tree,moduleinfo makeopts)
 
 makeopts.embed_rules: menuselect.makeopts
 	@echo "Generating embedded module rules ..."
 	@rm -f $@
-	@$(MAKE) $(PRINT_DIR) $(MOD_SUBDIRS_EMBED_LDSCRIPT)
-	@$(MAKE) $(PRINT_DIR) $(MOD_SUBDIRS_EMBED_LDFLAGS)
-	@$(MAKE) $(PRINT_DIR) $(MOD_SUBDIRS_EMBED_LIBS)
-
-$(SUBDIRS): main/version.c include/asterisk/build.h include/asterisk/buildopts.h defaults.h makeopts.embed_rules
+	@$(SILENT_SUBMAKE) $(MOD_SUBDIRS_EMBED_LDSCRIPT)
+	@$(SILENT_SUBMAKE) $(MOD_SUBDIRS_EMBED_LDFLAGS)
+	@$(SILENT_SUBMAKE) $(MOD_SUBDIRS_EMBED_LIBS)
+
+$(MOD_SUBDIRS) $(OTHER_SUBDIRS): main/version.c include/asterisk/build.h include/asterisk/buildopts.h defaults.h makeopts.embed_rules
 
 ifeq ($(findstring $(OSARCH), mingw32 cygwin ),)
     # Non-windows:
@@ -394,10 +398,10 @@
 endif
 
 $(MOD_SUBDIRS):
-	@ASTCFLAGS="$(MOD_SUBDIR_CFLAGS) $(ASTCFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(MAKE) $(PRINT_DIR) --no-builtin-rules -C $@ SUBDIR=$@ all
+	@+ASTCFLAGS="$(MOD_SUBDIR_CFLAGS) $(ASTCFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(call mod_subdir_make,SUBMAKE,,all)
 
 $(OTHER_SUBDIRS):
-	@ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(ASTCFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(MAKE) $(PRINT_DIR) --no-builtin-rules -C $@ SUBDIR=$@ all
+	@+ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(ASTCFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(call other_subdir_make,SUBMAKE,,all)
 
 defaults.h: makeopts
 	@build_tools/make_defaults_h > $@.tmp
@@ -419,22 +423,28 @@
 	@cmp -s $@.tmp $@ || mv $@.tmp $@
 	@rm -f $@.tmp
 
-$(SUBDIRS_CLEAN):
-	@$(MAKE) $(PRINT_DIR) -C $(@:-clean=) clean
-
-$(SUBDIRS_DIST_CLEAN):
-	@$(MAKE) $(PRINT_DIR) -C $(@:-dist-clean=) dist-clean
-
-clean: $(SUBDIRS_CLEAN)
+$(MOD_SUBDIRS_CLEAN):
+	@+$(call mod_subdir_make,SUBMAKE,clean)
+
+$(OTHER_SUBDIRS_CLEAN):
+	@+$(call other_subdir_make,SUBMAKE,clean)
+
+clean: $(MOD_SUBDIRS_CLEAN) $(OTHER_SUBDIRS_CLEAN)
 	rm -f defaults.h
 	rm -f include/asterisk/build.h
 	rm -f main/version.c
 	@$(MAKE) -C menuselect clean
 	cp -f .cleancount .lastclean
 
+$(MOD_SUBDIRS_DIST_CLEAN):
+	@+$(call mod_subdir_make,SUBMAKE,dist-clean)
+
+$(OTHER_SUBDIRS_DIST_CLEAN):
+	@+$(call other_subdir_make,SUBMAKE,dist-clean)
+
 dist-clean: distclean
 
-distclean: $(SUBDIRS_DIST_CLEAN) clean
+distclean: $(MOD_SUBDIRS_DIST_CLEAN) $(OTHER_SUBDIRS_DIST_CLEAN) clean
 	@$(MAKE) -C menuselect dist-clean
 	@$(MAKE) -C sounds dist-clean
 	rm -f menuselect.makeopts makeopts menuselect-tree menuselect.makedeps
@@ -534,8 +544,11 @@
 		$(INSTALL) -m 644 contrib/firmware/iax/iaxy.bin $(DESTDIR)$(ASTDATADIR)/firmware/iax/iaxy.bin; \
 	fi
 
-$(SUBDIRS_INSTALL):
-	@DESTDIR="$(DESTDIR)" ASTSBINDIR="$(ASTSBINDIR)" $(MAKE) --quiet $(PRINT_DIR) -C $(@:-install=) install
+$(MOD_SUBDIRS_INSTALL):
+	@+DESTDIR="$(DESTDIR)" ASTSBINDIR="$(ASTSBINDIR)" $(call mod_subdir_make,SUBMAKE,install)
+
+$(OTHER_SUBDIRS_INSTALL):
+	@+DESTDIR="$(DESTDIR)" ASTSBINDIR="$(ASTSBINDIR)" $(call other_subdir_make,SUBMAKE,install)
 
 NEWMODS:=$(foreach d,$(MOD_SUBDIRS),$(notdir $(wildcard $(d)/*.so)))
 OLDMODS=$(filter-out $(NEWMODS),$(notdir $(wildcard $(DESTDIR)$(MODULES_DIR)/*.so)))
@@ -558,7 +571,7 @@
 		echo " WARNING WARNING WARNING" ;\
 	fi
 
-install: datafiles bininstall $(SUBDIRS_INSTALL)
+install: datafiles bininstall $(MOD_SUBDIRS_INSTALL) $(OTHER_SUBDIRS_INSTALL)
 	@if [ -x /usr/sbin/asterisk-post-install ]; then \
 		/usr/sbin/asterisk-post-install $(DESTDIR) . ; \
 	fi
@@ -758,10 +771,13 @@
 cleantest:
 	@cmp -s .cleancount .lastclean || $(MAKE) clean
 
-$(SUBDIRS_UNINSTALL):
-	@$(MAKE) $(PRINT_DIR) -C $(@:-uninstall=) uninstall
-
-_uninstall: $(SUBDIRS_UNINSTALL)
+$(MOD_SUBDIRS_UNINSTALL):
+	@+$(call mod_subdir_make,SUBMAKE,uninstall)
+
+$(OTHER_SUBDIRS_UNINSTALL):
+	@+$(call other_subdir_make,SUBMAKE,uninstall)
+
+_uninstall: $(MOD_SUBDIRS_UNINSTALL) $(OTHER_SUBDIRS_UNINSTALL)
 	rm -f $(DESTDIR)$(MODULES_DIR)/*
 	rm -f $(DESTDIR)$(ASTSBINDIR)/*asterisk*
 	rm -f $(DESTDIR)$(ASTSBINDIR)/astgenkey
@@ -823,8 +839,8 @@
 	@echo "<?xml version=\"1.0\"?>" > $@
 	@echo >> $@
 	@echo "<menu name=\"Asterisk Module and Build Option Selection\">" >> $@
-	@for dir in $(sort $(filter-out main,$(MOD_SUBDIRS))); do $(SUBMAKE) -C $${dir} SUBDIR=$${dir} moduleinfo >> $@; done
-	@for dir in $(sort $(filter-out main,$(MOD_SUBDIRS))); do $(SUBMAKE) -C $${dir} SUBDIR=$${dir} makeopts >> $@; done
+	@for dir in $(sort $(filter-out main,$(MOD_SUBDIRS))); do $(SUBMAKE) -C $${dir} -f $(ASTTOPDIR)/Makefile.moddir SUBDIR=$${dir} moduleinfo >> $@; done
+	@for dir in $(sort $(filter-out main,$(MOD_SUBDIRS))); do $(SUBMAKE) -C $${dir} -f $(ASTTOPDIR)/Makefile.moddir SUBDIR=$${dir} makeopts >> $@; done
 	@cat build_tools/cflags.xml >> $@
 	@cat build_tools/embed_modules.xml >> $@
 	@cat sounds/sounds.xml >> $@
@@ -834,4 +850,7 @@
 asterisk.pdf:
 	$(MAKE) -C doc/tex asterisk.pdf
 
-.PHONY: menuselect main sounds clean dist-clean distclean all prereqs cleantest uninstall _uninstall uninstall-all pdf dont-optimize $(SUBDIRS_INSTALL) $(SUBDIRS_DIST_CLEAN) $(SUBDIRS_CLEAN) $(SUBDIRS_UNINSTALL) $(SUBDIRS) $(MOD_SUBDIRS_EMBED_LDSCRIPT) $(MOD_SUBDIRS_EMBED_LDFLAGS) $(MOD_SUBDIRS_EMBED_LIBS) main/version.c
+.PHONY: menuselect main sounds clean dist-clean distclean all prereqs cleantest uninstall _uninstall uninstall-all pdf dont-optimize main/version.c
+.PHONY: $(foreach d,MOD OTHER,$(foreach t,INSTALL UNINSTALL CLEAN DIST_CLEAN,$($(d)_SUBDIRS_$(t))))
+.PHONY: $(MOD_SUBDIRS) $(OTHER_SUBDIRS)
+.PHONY: $(MOD_SUBDIRS_EMBED_LDSCRIPT) $(MOD_SUBDIRS_EMBED_LDFLAGS) $(MOD_SUBDIRS_EMBED_LIBS)

Copied: team/kpfleming/multimodule-build/Makefile.moddir (from r103662, team/kpfleming/multimodule-build/Makefile.moddir_rules)
URL: http://svn.digium.com/view/asterisk/team/kpfleming/multimodule-build/Makefile.moddir?view=diff&rev=103665&p1=team/kpfleming/multimodule-build/Makefile.moddir_rules&r1=103662&p2=team/kpfleming/multimodule-build/Makefile.moddir&r2=103665
==============================================================================
--- team/kpfleming/multimodule-build/Makefile.moddir_rules (original)
+++ team/kpfleming/multimodule-build/Makefile.moddir Wed Feb 13 18:06:14 2008
@@ -3,7 +3,7 @@
 # 
 # Makefile rules for subdirectories containing modules
 #
-# Copyright (C) 2006, Digium, Inc.
+# Copyright (C) 2006 - 2008, Digium, Inc.
 #
 # Kevin P. Fleming <kpfleming at digium.com>
 #
@@ -17,6 +17,30 @@
 # (remember that they apply recursively to prerequisites).
 # Also note that we can only set one variable per rule, so we have to
 # repeat the left hand side to set multiple variables.
+
+-include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps
+
+# default target
+
+all: _all
+
+# create targets for sub-Makefiles to extend
+clean::
+	rm -f *.so *.o *.oo *.eo
+	rm -f .*.o.d .*.oo.d
+	rm -f *.s *.i
+	rm -f modules.link
+
+install:: all
+	@echo "Installing modules from `basename $(CURDIR)`..."
+	@for x in $(LOADABLE_MODS:%=%.so); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
+
+uninstall::
+
+dist-clean::
+	rm -f .*.moduleinfo .moduleinfo
+	rm -f .*.makeopts .makeopts
+
 
 ifneq ($(findstring MALLOC_DEBUG,$(MENUSELECT_CFLAGS)),)
  ifeq ($(findstring astmm.h,$(ASTCFLAGS)),)
@@ -33,6 +57,8 @@
 endif
 
 include $(ASTTOPDIR)/Makefile.rules
+
+include Makefile
 
 # If MODULE_PREFIX is defined, use it to run the standard functions to set
 # C_MODS, CC_MODS, LOADABLE_MODS and EMBEDDED_MODS. If MULTI_C_MODS or
@@ -124,22 +150,6 @@
 	@for file in $(patsubst %,$(SUBDIR)/%,$(filter %.eo,$^)); do echo "INPUT (../$${file})" >> $@; done
 	@for file in $(patsubst %,$(SUBDIR)/%,$(filter-out %.eo,$^)); do echo "INPUT (../$${file})" >> $@; done
 
-clean::
-	rm -f *.so *.o *.oo *.eo
-	rm -f .*.o.d .*.oo.d
-	rm -f *.s *.i
-	rm -f modules.link
-
-install:: all
-	@echo "Installing modules from `basename $(CURDIR)`..."
-	@for x in $(LOADABLE_MODS:%=%.so); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
-
-uninstall::
-
-dist-clean::
-	rm -f .*.moduleinfo .moduleinfo
-	rm -f .*.makeopts .makeopts
-
 .%.moduleinfo: %.c
 	@echo "<member name=\"$*\" displayname=\"$(shell $(GREP) -e AST_MODULE_INFO $< | head -n 1 | cut -d '"' -f 2)\" remove_on_change=\"$(SUBDIR)/$*.o $(SUBDIR)/$*.so\">" > $@
 	$(AWK) -f $(ASTTOPDIR)/build_tools/get_moduleinfo $< >> $@

Modified: team/kpfleming/multimodule-build/Makefile.rules
URL: http://svn.digium.com/view/asterisk/team/kpfleming/multimodule-build/Makefile.rules?view=diff&rev=103665&r1=103664&r2=103665
==============================================================================
--- team/kpfleming/multimodule-build/Makefile.rules (original)
+++ team/kpfleming/multimodule-build/Makefile.rules Wed Feb 13 18:06:14 2008
@@ -17,6 +17,8 @@
 # behaviour. ECHO_PREFIX prefixes the comment, CMD_PREFIX prefixes the command.
 
 -include $(ASTTOPDIR)/makeopts
+
+FORCE:
 
 .PHONY: dist-clean
 

Modified: team/kpfleming/multimodule-build/apps/Makefile
URL: http://svn.digium.com/view/asterisk/team/kpfleming/multimodule-build/apps/Makefile?view=diff&rev=103665&r1=103664&r2=103665
==============================================================================
--- team/kpfleming/multimodule-build/apps/Makefile (original)
+++ team/kpfleming/multimodule-build/apps/Makefile Wed Feb 13 18:06:14 2008
@@ -8,8 +8,6 @@
 # This program is free software, distributed under the terms of
 # the GNU General Public License
 #
-
--include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps
 
 MODULE_PREFIX=app
 MENUSELECT_CATEGORY=APPS
@@ -30,12 +28,7 @@
   RT_LIB=-lrt
 endif
 
-all: _all
-
-include $(ASTTOPDIR)/Makefile.moddir_rules
-
 ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
   LIBS+= -lres_features.so -lres_ael_share.so -lres_monitor.so -lres_speech.so
   LIBS+= -lres_smdi.so
 endif
-

Modified: team/kpfleming/multimodule-build/cdr/Makefile
URL: http://svn.digium.com/view/asterisk/team/kpfleming/multimodule-build/cdr/Makefile?view=diff&rev=103665&r1=103664&r2=103665
==============================================================================
--- team/kpfleming/multimodule-build/cdr/Makefile (original)
+++ team/kpfleming/multimodule-build/cdr/Makefile Wed Feb 13 18:06:14 2008
@@ -9,12 +9,6 @@
 # the GNU General Public License
 #
 
--include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps
-
 MODULE_PREFIX=cdr
 MENUSELECT_CATEGORY=CDR
 MENUSELECT_DESCRIPTION=Call Detail Recording
-
-all: _all
-
-include $(ASTTOPDIR)/Makefile.moddir_rules

Modified: team/kpfleming/multimodule-build/channels/Makefile
URL: http://svn.digium.com/view/asterisk/team/kpfleming/multimodule-build/channels/Makefile?view=diff&rev=103665&r1=103664&r2=103665
==============================================================================
--- team/kpfleming/multimodule-build/channels/Makefile (original)
+++ team/kpfleming/multimodule-build/channels/Makefile Wed Feb 13 18:06:14 2008
@@ -8,8 +8,6 @@
 # This program is free software, distributed under the terms of
 # the GNU General Public License
 #
-
--include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps
 
 MODULE_PREFIX=chan
 MENUSELECT_CATEGORY=CHANNELS
@@ -38,7 +36,7 @@
 endif
 
 ifeq ($(wildcard h323/libchanh323.a),)
-  MODULE_EXCLUDE += chan_h323
+  MODULE_EXCLUDE+=chan_h323
 endif
 
 ifndef OPENH323DIR
@@ -49,8 +47,6 @@
   PWLIBDIR=$(HOME)/pwlib
 endif
 
-all: _all
-
 MULTI_C_MODS:=chan_misdn
 MULTI_CC_MODS:=chan_bar
 
@@ -58,8 +54,6 @@
 chan_bar.oo:=chan_bar_1.oo bar_2.oo bar_3.oo
 
 chan_misdn.o: $(chan_misdn.o)
-
-include $(ASTTOPDIR)/Makefile.moddir_rules
 
 ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
   LIBS+= -lres_monitor.so -lres_features.so

Modified: team/kpfleming/multimodule-build/codecs/Makefile
URL: http://svn.digium.com/view/asterisk/team/kpfleming/multimodule-build/codecs/Makefile?view=diff&rev=103665&r1=103664&r2=103665
==============================================================================
--- team/kpfleming/multimodule-build/codecs/Makefile (original)
+++ team/kpfleming/multimodule-build/codecs/Makefile Wed Feb 13 18:06:14 2008
@@ -11,8 +11,6 @@
 # the GNU General Public License
 #
 
--include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps
-
 MODULE_PREFIX=codec
 MENUSELECT_CATEGORY=CODECS
 MENUSELECT_DESCRIPTION=Codec Translators
@@ -21,38 +19,32 @@
 LIBLPC10:=lpc10/liblpc10.a
 LIBG722:=g722/libg722.a
 
-all: _all
-
-include $(ASTTOPDIR)/Makefile.moddir_rules
-
 ifneq ($(GSM_INTERNAL),no)
 GSM_INCLUDE:=-Igsm/inc
 $(if $(filter codec_gsm,$(EMBEDDED_MODS)),modules.link,codec_gsm.so): gsm/lib/libgsm.a
 endif
 
 clean::
-	$(MAKE) -C gsm clean
-	$(MAKE) -C lpc10 clean
-	$(MAKE) -C ilbc clean
-	$(MAKE) -C g722 clean
+	@+$(SUBMAKE) -C gsm clean
+	@+$(SUBMAKE) -C lpc10 clean
+	@+$(SUBMAKE) -C ilbc clean
+	@+$(SUBMAKE) -C g722 clean
 
 gsm/lib/libgsm.a:
 	@mkdir -p gsm/lib
-	@$(MAKE) -C gsm lib/libgsm.a
+	@+$(SUBMAKE) -C gsm lib/libgsm.a
 
-$(LIBLPC10):
-	@$(MAKE) -C lpc10 all
+$(LIBLPC10): FORCE
+	@+$(SUBMAKE) -C lpc10 all
 
 $(if $(filter codec_lpc10,$(EMBEDDED_MODS)),modules.link,codec_lpc10.so): $(LIBLPC10)
 
-$(LIBILBC):
-	@$(MAKE) -C ilbc all
+$(LIBILBC): FORCE
+	@+$(SUBMAKE) -C ilbc all
 
 $(if $(filter codec_ilbc,$(EMBEDDED_MODS)),modules.link,codec_ilbc.so): $(LIBILBC)
 
-FORCE:
-
 $(LIBG722): FORCE
-	@$(MAKE) -C g722 all
+	@+$(SUBMAKE) -C g722 all
 
 $(if $(filter codec_g722,$(EMBEDDED_MODS)),modules.link,codec_g722.so): $(LIBG722)

Modified: team/kpfleming/multimodule-build/formats/Makefile
URL: http://svn.digium.com/view/asterisk/team/kpfleming/multimodule-build/formats/Makefile?view=diff&rev=103665&r1=103664&r2=103665
==============================================================================
--- team/kpfleming/multimodule-build/formats/Makefile (original)
+++ team/kpfleming/multimodule-build/formats/Makefile Wed Feb 13 18:06:14 2008
@@ -9,12 +9,6 @@
 # the GNU General Public License
 #
 
--include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps
-
 MODULE_PREFIX=format
 MENUSELECT_CATEGORY=FORMATS
 MENUSELECT_DESCRIPTION=Format Interpreters
-
-all: _all
-
-include $(ASTTOPDIR)/Makefile.moddir_rules

Modified: team/kpfleming/multimodule-build/funcs/Makefile
URL: http://svn.digium.com/view/asterisk/team/kpfleming/multimodule-build/funcs/Makefile?view=diff&rev=103665&r1=103664&r2=103665
==============================================================================
--- team/kpfleming/multimodule-build/funcs/Makefile (original)
+++ team/kpfleming/multimodule-build/funcs/Makefile Wed Feb 13 18:06:14 2008
@@ -9,12 +9,6 @@
 # the GNU General Public License
 #
 
--include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps
-
 MODULE_PREFIX=func
 MENUSELECT_CATEGORY=FUNCS
 MENUSELECT_DESCRIPTION=Dialplan Functions
-
-all: _all
-
-include $(ASTTOPDIR)/Makefile.moddir_rules

Modified: team/kpfleming/multimodule-build/main/Makefile
URL: http://svn.digium.com/view/asterisk/team/kpfleming/multimodule-build/main/Makefile?view=diff&rev=103665&r1=103664&r2=103665
==============================================================================
--- team/kpfleming/multimodule-build/main/Makefile (original)
+++ team/kpfleming/multimodule-build/main/Makefile Wed Feb 13 18:06:14 2008
@@ -11,11 +11,9 @@
 # the GNU General Public License
 #
 
--include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps $(ASTTOPDIR)/makeopts.embed_rules
+-include $(ASTTOPDIR)/makeopts.embed_rules
 
 all: asterisk
-
-include $(ASTTOPDIR)/Makefile.moddir_rules
 
 RESAMPLE_OBJS:=libresample/src/resample.o libresample/src/resamplesubs.o libresample/src/filterkit.o
 
@@ -105,13 +103,11 @@
   ASTLINK=
 endif
 
-CHECK_SUBDIR:	# do nothing, just make sure that we recurse in the subdir/
-
-editline/libedit.a: CHECK_SUBDIR
+editline/libedit.a: FORCE
 	cd editline && test -f config.h || CFLAGS="$(PTHREAD_CFLAGS) $(subst $(ASTTOPDIR),../../,$(ASTCFLAGS:-Werror=))" LDFLAGS="$(ASTLDFLAGS)" ./configure --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) --with-ncurses=$(NCURSES_DIR) --with-curses=$(CURSES_DIR) --with-termcap=$(TERMCAP_DIR) --with-tinfo=$(TINFO_DIR)
 	$(MAKE) -C editline libedit.a
 
-db1-ast/libdb1.a: CHECK_SUBDIR
+db1-ast/libdb1.a: FORCE
 	CFLAGS="$(subst $(ASTTOPDIR),../../,$(ASTCFLAGS))" LDFLAGS="$(ASTLDFLAGS)" $(MAKE) -C db1-ast libdb1.a
 
 ast_expr2.c ast_expr2.h:
@@ -142,7 +138,7 @@
   H323LDLIBS=
 endif
 
-minimime/libmmime.a: CHECK_SUBDIR
+minimime/libmmime.a: FORCE
 	@cd minimime && $(MAKE) libmmime.a
 
 ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)

Modified: team/kpfleming/multimodule-build/main/minimime/Makefile
URL: http://svn.digium.com/view/asterisk/team/kpfleming/multimodule-build/main/minimime/Makefile?view=diff&rev=103665&r1=103664&r2=103665
==============================================================================
--- team/kpfleming/multimodule-build/main/minimime/Makefile (original)
+++ team/kpfleming/multimodule-build/main/minimime/Makefile Wed Feb 13 18:06:14 2008
@@ -11,7 +11,7 @@
 
 -include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps
 
-include $(ASTTOPDIR)/Makefile.moddir_rules
+# include $(ASTTOPDIR)/Makefile.moddir_rules
 
 LIBMMIME:=libmmime.a
 MM_SRCS= \

Modified: team/kpfleming/multimodule-build/pbx/Makefile
URL: http://svn.digium.com/view/asterisk/team/kpfleming/multimodule-build/pbx/Makefile?view=diff&rev=103665&r1=103664&r2=103665
==============================================================================
--- team/kpfleming/multimodule-build/pbx/Makefile (original)
+++ team/kpfleming/multimodule-build/pbx/Makefile Wed Feb 13 18:06:14 2008
@@ -9,15 +9,9 @@
 # the GNU General Public License
 #
 
--include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps
-
 MODULE_PREFIX=pbx
 MENUSELECT_CATEGORY=PBX
 MENUSELECT_DESCRIPTION=PBX Modules
-
-all: _all
-
-include $(ASTTOPDIR)/Makefile.moddir_rules
 
 ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
   LIBS+= -lres_ael_share.so -lres_monitor.so

Modified: team/kpfleming/multimodule-build/res/Makefile
URL: http://svn.digium.com/view/asterisk/team/kpfleming/multimodule-build/res/Makefile?view=diff&rev=103665&r1=103664&r2=103665
==============================================================================
--- team/kpfleming/multimodule-build/res/Makefile (original)
+++ team/kpfleming/multimodule-build/res/Makefile Wed Feb 13 18:06:14 2008
@@ -9,15 +9,9 @@
 # the GNU General Public License
 #
 
--include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps
-
 MODULE_PREFIX=res
 MENUSELECT_CATEGORY=RES
 MENUSELECT_DESCRIPTION=Resource Modules
-
-all: _all
-
-include $(ASTTOPDIR)/Makefile.moddir_rules
 
 ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
   # cygwin has some dependencies among res_ things.

Modified: team/kpfleming/multimodule-build/tests/Makefile
URL: http://svn.digium.com/view/asterisk/team/kpfleming/multimodule-build/tests/Makefile?view=diff&rev=103665&r1=103664&r2=103665
==============================================================================
--- team/kpfleming/multimodule-build/tests/Makefile (original)
+++ team/kpfleming/multimodule-build/tests/Makefile Wed Feb 13 18:06:14 2008
@@ -9,12 +9,6 @@
 # the GNU General Public License
 #
 
--include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps
-
 MODULE_PREFIX=test
 MENUSELECT_CATEGORY=TEST
 MENUSELECT_DESCRIPTION=Test Modules
-
-all: _all
-
-include $(ASTTOPDIR)/Makefile.moddir_rules




More information about the asterisk-commits mailing list