[asterisk-commits] trunk r35503 - in /trunk: ./ agi/ apps/ cdr/ channels/ codecs/ formats/ funcs...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Jun 22 08:38:13 MST 2006


Author: russell
Date: Thu Jun 22 10:38:13 2006
New Revision: 35503

URL: http://svn.digium.com/view/asterisk?rev=35503&view=rev
Log:
- convert the 'uninstall' target to use separate targets to process each
  subdirectory instead of a for loop
- remove the FORCE target from the main Makefile and add the couple places
  I used it to the .PHONY target.  .PHONY does the same thing and is a built-in
  more efficient way of doing it.
- add a bunch more targets to .PHONY ...

Modified:
    trunk/Makefile
    trunk/agi/Makefile
    trunk/apps/Makefile
    trunk/cdr/Makefile
    trunk/channels/Makefile
    trunk/codecs/Makefile
    trunk/formats/Makefile
    trunk/funcs/Makefile
    trunk/pbx/Makefile
    trunk/res/Makefile
    trunk/utils/Makefile

Modified: trunk/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/Makefile?rev=35503&r1=35502&r2=35503&view=diff
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Thu Jun 22 10:38:13 2006
@@ -12,8 +12,6 @@
 #
 
 .EXPORT_ALL_VARIABLES:
-
-.PHONY: sounds clean clean-depend dist-clean all depend
 
 # Create OPTIONS variable
 OPTIONS=
@@ -273,6 +271,7 @@
 MOD_SUBDIRS_DEPEND:=$(MOD_SUBDIRS:%=%-depend)
 OTHER_SUBDIRS_DEPEND:=$(OTHER_SUBDIRS:%=%-depend)
 SUBDIRS_DEPEND:=$(MOD_SUBDIRS_DEPEND) $(OTHER_SUBDIRS_DEPEND)
+SUBDIRS_UNINSTALL:=$(SUBDIRS:%=%-uninstall)
 
 OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o \
 	translate.o file.o pbx.o cli.o md5.o term.o \
@@ -371,10 +370,10 @@
 
 all: cleantest config.status menuselect.makeopts depend asterisk $(SUBDIRS)
 
-$(MOD_SUBDIRS): FORCE
+$(MOD_SUBDIRS):
 	@CFLAGS="$(MOD_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $@
 
-$(OTHER_SUBDIRS): FORCE 
+$(OTHER_SUBDIRS):
 	@CFLAGS="$(OTHER_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $@
 
 config.status: configure
@@ -816,8 +815,6 @@
 
 etags: TAGS
 
-FORCE:
-
 %_env:
 	$(MAKE) -C $(shell echo $@ | sed "s/_env//g") env
 
@@ -837,7 +834,10 @@
 		$(MAKE) defaults.h;\
 	fi
 
-_uninstall:
+$(SUBDIRS_UNINSTALL):
+	@$(MAKE) -C $(@:-uninstall=) uninstall
+
+_uninstall: $(SUBDIRS_UNINSTALL)
 	rm -f $(DESTDIR)$(MODULES_DIR)/*
 	rm -f $(DESTDIR)$(ASTSBINDIR)/*asterisk*
 	rm -f $(DESTDIR)$(ASTSBINDIR)/astgenkey
@@ -845,7 +845,6 @@
 	rm -rf $(DESTDIR)$(ASTHEADERDIR)
 	rm -rf $(DESTDIR)$(ASTDATADIR)/firmware
 	rm -rf $(DESTDIR)$(ASTMANDIR)/man8
-	for x in $(SUBDIRS); do $(MAKE) -C $$x uninstall || exit 1 ; done
 	$(MAKE) -C sounds uninstall
 
 uninstall: _uninstall
@@ -883,3 +882,5 @@
 makeopts.xml: $(foreach dir,$(MOD_SUBDIRS),$(dir)/*.c) build_tools/cflags.xml sounds/sounds.xml
 	@echo "Generating list of available modules ..."
 	@build_tools/prep_moduledeps > $@
+
+.PHONY: sounds clean clean-depend dist-clean all _all depend cleantest uninstall _uninstall uninstall-all dont-optimize valgrind $(SUBDIRS_INSTALL) $(SUBDIRS_CLEAN) $(SUBDIRS_CLEAN_DEPEND) $(SUBDIRS_DEPEND) $(SUBDIRS_UNINSTALL)

Modified: trunk/agi/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/agi/Makefile?rev=35503&r1=35502&r2=35503&view=diff
==============================================================================
--- trunk/agi/Makefile (original)
+++ trunk/agi/Makefile Thu Jun 22 10:38:13 2006
@@ -11,7 +11,7 @@
 # the GNU General Public License
 #
 
-.PHONY: clean clean-depend all depend
+.PHONY: clean clean-depend all depend uninstall
 
 AGIS=agi-test.agi eagi-test eagi-sphinx-test jukebox.agi
 

Modified: trunk/apps/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/apps/Makefile?rev=35503&r1=35502&r2=35503&view=diff
==============================================================================
--- trunk/apps/Makefile (original)
+++ trunk/apps/Makefile Thu Jun 22 10:38:13 2006
@@ -11,7 +11,7 @@
 # the GNU General Public License
 #
 
-.PHONY: clean clean-depend all depend
+.PHONY: clean clean-depend all depend uninstall
 
 ifneq ($(wildcard ../menuselect.makeopts),)
   include ../menuselect.makeopts

Modified: trunk/cdr/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/cdr/Makefile?rev=35503&r1=35502&r2=35503&view=diff
==============================================================================
--- trunk/cdr/Makefile (original)
+++ trunk/cdr/Makefile Thu Jun 22 10:38:13 2006
@@ -11,7 +11,7 @@
 # the GNU General Public License
 #
 
-.PHONY: clean clean-depend all depend
+.PHONY: clean clean-depend all depend uninstall
 
 ifneq ($(wildcard ../menuselect.makeopts),)
   include ../menuselect.makeopts

Modified: trunk/channels/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/channels/Makefile?rev=35503&r1=35502&r2=35503&view=diff
==============================================================================
--- trunk/channels/Makefile (original)
+++ trunk/channels/Makefile Thu Jun 22 10:38:13 2006
@@ -11,7 +11,7 @@
 # the GNU General Public License
 #
 
-.PHONY: clean clean-depend all depend
+.PHONY: clean clean-depend all depend uninstall
 
 ifneq ($(wildcard ../menuselect.makeopts),)
   include ../menuselect.makeopts

Modified: trunk/codecs/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/codecs/Makefile?rev=35503&r1=35502&r2=35503&view=diff
==============================================================================
--- trunk/codecs/Makefile (original)
+++ trunk/codecs/Makefile Thu Jun 22 10:38:13 2006
@@ -11,7 +11,7 @@
 # the GNU General Public License
 #
 
-.PHONY: clean clean-depend all depend
+.PHONY: clean clean-depend all depend uninstall
 
 ifneq ($(wildcard ../menuselect.makeopts),)
   include ../menuselect.makeopts

Modified: trunk/formats/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/formats/Makefile?rev=35503&r1=35502&r2=35503&view=diff
==============================================================================
--- trunk/formats/Makefile (original)
+++ trunk/formats/Makefile Thu Jun 22 10:38:13 2006
@@ -11,7 +11,7 @@
 # the GNU General Public License
 #
 
-.PHONY: clean clean-depend all depend
+.PHONY: clean clean-depend all depend uninstall
 
 ifneq ($(wildcard ../menuselect.makeopts),)
   include ../menuselect.makeopts

Modified: trunk/funcs/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/funcs/Makefile?rev=35503&r1=35502&r2=35503&view=diff
==============================================================================
--- trunk/funcs/Makefile (original)
+++ trunk/funcs/Makefile Thu Jun 22 10:38:13 2006
@@ -11,7 +11,7 @@
 # the GNU General Public License
 #
 
-.PHONY: clean clean-depend all depend
+.PHONY: clean clean-depend all depend uninstall
 
 ifneq ($(wildcard ../menuselect.makeopts),)
   include ../menuselect.makeopts

Modified: trunk/pbx/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/pbx/Makefile?rev=35503&r1=35502&r2=35503&view=diff
==============================================================================
--- trunk/pbx/Makefile (original)
+++ trunk/pbx/Makefile Thu Jun 22 10:38:13 2006
@@ -11,7 +11,7 @@
 # the GNU General Public License
 #
 
-.PHONY: clean clean-depend all depend
+.PHONY: clean clean-depend all depend uninstall
 
 ifneq ($(wildcard ../menuselect.makeopts),)
   include ../menuselect.makeopts

Modified: trunk/res/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/res/Makefile?rev=35503&r1=35502&r2=35503&view=diff
==============================================================================
--- trunk/res/Makefile (original)
+++ trunk/res/Makefile Thu Jun 22 10:38:13 2006
@@ -11,7 +11,7 @@
 # the GNU General Public License
 #
 
-.PHONY: clean clean-depend all depend
+.PHONY: clean clean-depend all depend uninstall
 
 ifneq ($(wildcard ../menuselect.makeopts),)
   include ../menuselect.makeopts

Modified: trunk/utils/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/utils/Makefile?rev=35503&r1=35502&r2=35503&view=diff
==============================================================================
--- trunk/utils/Makefile (original)
+++ trunk/utils/Makefile Thu Jun 22 10:38:13 2006
@@ -11,7 +11,7 @@
 # the GNU General Public License
 #
 
-.PHONY: clean clean-depend all depend
+.PHONY: clean clean-depend all depend uninstall
 
 UTILS:=astman smsq stereorize streamplayer aelparse
 



More information about the asterisk-commits mailing list