[svn-commits] trunk r35436 - /trunk/Makefile

svn-commits at lists.digium.com svn-commits at lists.digium.com
Thu Jun 22 05:14:29 MST 2006


Author: russell
Date: Thu Jun 22 07:14:29 2006
New Revision: 35436

URL: http://svn.digium.com/view/asterisk?rev=35436&view=rev
Log:
instead of using a for loop to call make on each subdirectory, use a target for
each subdirectory.
 - the shell code in the for loop doesn't have a manually catch errors from
   make on a subdirectory
 - you can now run something like "make apps" or "make channels" from the root
   source directory
 - This should allow for better support for parallel instances of make (the -j
   option) since make can work on each subdirectory target in parallel

Modified:
    trunk/Makefile

Modified: trunk/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/Makefile?rev=35436&r1=35435&r2=35436&view=diff
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Thu Jun 22 07:14:29 2006
@@ -368,7 +368,7 @@
 	@echo " +               make install                +"  
 	@echo " +-------------------------------------------+"  
 
-all: cleantest config.status menuselect.makeopts depend asterisk subdirs
+all: cleantest config.status menuselect.makeopts depend asterisk $(SUBDIRS)
 
 config.status: configure
 	@CFLAGS="" ./configure
@@ -480,10 +480,11 @@
 muted: muted.o
 	$(CC) $(AUDIO_LIBS) -o muted muted.o
 
-subdirs: 
-	@for x in $(MOD_SUBDIRS); do CFLAGS="$(MOD_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $$x || exit 1 ; done
-	@CFLAGS="$(OTHER_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C utils
-	@CFLAGS="$(OTHER_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C agi
+$(MOD_SUBDIRS): FORCE
+	@CFLAGS="$(MOD_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $@
+
+$(OTHER_SUBDIRS): FORCE 
+	@CFLAGS="$(OTHER_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $@
 
 clean-depend:
 	@for x in $(SUBDIRS); do $(MAKE) -C $$x clean-depend || exit 1 ; done



More information about the svn-commits mailing list