diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-22 15:08:08 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-22 15:08:08 +0000 |
commit | ddb0e59eb041414bdcc5c5fe1d514d2423163f66 (patch) | |
tree | b87bcf0d39d762c78c13572e696f6b9df6bc940f | |
parent | 60c04446dbd1b34cd6fbef1ed877df460a328fcd (diff) |
- specify that 'depend' is a .PHONY target
- use separate targets instead of a for loop for doing 'make depend' for
each sub directory
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@35501 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | Makefile | 19 | ||||
-rw-r--r-- | agi/Makefile | 2 | ||||
-rw-r--r-- | apps/Makefile | 2 | ||||
-rw-r--r-- | cdr/Makefile | 2 | ||||
-rw-r--r-- | channels/Makefile | 2 | ||||
-rw-r--r-- | codecs/Makefile | 2 | ||||
-rw-r--r-- | formats/Makefile | 2 | ||||
-rw-r--r-- | funcs/Makefile | 2 | ||||
-rw-r--r-- | pbx/Makefile | 2 | ||||
-rw-r--r-- | res/Makefile | 2 | ||||
-rw-r--r-- | utils/Makefile | 2 |
11 files changed, 23 insertions, 16 deletions
@@ -13,7 +13,7 @@ .EXPORT_ALL_VARIABLES: -.PHONY: sounds clean clean-depend dist-clean all +.PHONY: sounds clean clean-depend dist-clean all depend # Create OPTIONS variable OPTIONS= @@ -264,12 +264,15 @@ endif ASTCFLAGS+=$(MALLOC_DEBUG)$(BUSYDETECT)$(OPTIONS) -MOD_SUBDIRS=res channels pbx apps codecs formats cdr funcs -OTHER_SUBDIRS=utils agi +MOD_SUBDIRS:=res channels pbx apps codecs formats cdr funcs +OTHER_SUBDIRS:=utils agi SUBDIRS:=$(MOD_SUBDIRS) $(OTHER_SUBDIRS) SUBDIRS_INSTALL:=$(SUBDIRS:%=%-install) SUBDIRS_CLEAN:=$(SUBDIRS:%=%-clean) SUBDIRS_CLEAN_DEPEND:=$(SUBDIRS:%=%-clean-depend) +MOD_SUBDIRS_DEPEND:=$(MOD_SUBDIRS:%=%-depend) +OTHER_SUBDIRS_DEPEND:=$(OTHER_SUBDIRS:%=%-depend) +SUBDIRS_DEPEND:=$(MOD_SUBDIRS_DEPEND) $(OTHER_SUBDIRS_DEPEND) 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 \ @@ -775,9 +778,13 @@ dont-optimize: _all valgrind: dont-optimize -depend: include/asterisk/version.h include/asterisk/buildopts.h .depend defaults.h - @for x in $(MOD_SUBDIRS); do CFLAGS="$(MOD_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $$x depend || exit 1 ; done - @for x in $(OTHER_SUBDIRS); do CFLAGS="$(OTHER_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $$x depend || exit 1 ; done +$(MOD_SUBDIRS_DEPEND): + @CFLAGS="$(MOD_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $(@:-depend=) depend + +$(OTHER_SUBDIRS_DEPEND): + @CFLAGS="$(OTHER_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) -C $(@:-depend=) depend + +depend: include/asterisk/version.h include/asterisk/buildopts.h .depend defaults.h $(SUBDIRS_DEPEND) .depend: include/asterisk/version.h include/asterisk/buildopts.h defaults.h build_tools/mkdep $(CFLAGS) $(wildcard *.c) diff --git a/agi/Makefile b/agi/Makefile index 21c1d5799..d73f2382c 100644 --- a/agi/Makefile +++ b/agi/Makefile @@ -11,7 +11,7 @@ # the GNU General Public License # -.PHONY: clean clean-depend all +.PHONY: clean clean-depend all depend AGIS=agi-test.agi eagi-test eagi-sphinx-test jukebox.agi diff --git a/apps/Makefile b/apps/Makefile index 7ceac360c..012858202 100644 --- a/apps/Makefile +++ b/apps/Makefile @@ -11,7 +11,7 @@ # the GNU General Public License # -.PHONY: clean clean-depend all +.PHONY: clean clean-depend all depend ifneq ($(wildcard ../menuselect.makeopts),) include ../menuselect.makeopts diff --git a/cdr/Makefile b/cdr/Makefile index ccefb060e..1b4df7978 100644 --- a/cdr/Makefile +++ b/cdr/Makefile @@ -11,7 +11,7 @@ # the GNU General Public License # -.PHONY: clean clean-depend all +.PHONY: clean clean-depend all depend ifneq ($(wildcard ../menuselect.makeopts),) include ../menuselect.makeopts diff --git a/channels/Makefile b/channels/Makefile index c9b0fc36e..93429b6b4 100644 --- a/channels/Makefile +++ b/channels/Makefile @@ -11,7 +11,7 @@ # the GNU General Public License # -.PHONY: clean clean-depend all +.PHONY: clean clean-depend all depend ifneq ($(wildcard ../menuselect.makeopts),) include ../menuselect.makeopts diff --git a/codecs/Makefile b/codecs/Makefile index 4ac7aa976..1528ee374 100644 --- a/codecs/Makefile +++ b/codecs/Makefile @@ -11,7 +11,7 @@ # the GNU General Public License # -.PHONY: clean clean-depend all +.PHONY: clean clean-depend all depend ifneq ($(wildcard ../menuselect.makeopts),) include ../menuselect.makeopts diff --git a/formats/Makefile b/formats/Makefile index ca2503d1d..1a306d2f2 100644 --- a/formats/Makefile +++ b/formats/Makefile @@ -11,7 +11,7 @@ # the GNU General Public License # -.PHONY: clean clean-depend all +.PHONY: clean clean-depend all depend ifneq ($(wildcard ../menuselect.makeopts),) include ../menuselect.makeopts diff --git a/funcs/Makefile b/funcs/Makefile index 827458ba9..b4310f9bf 100644 --- a/funcs/Makefile +++ b/funcs/Makefile @@ -11,7 +11,7 @@ # the GNU General Public License # -.PHONY: clean clean-depend all +.PHONY: clean clean-depend all depend ifneq ($(wildcard ../menuselect.makeopts),) include ../menuselect.makeopts diff --git a/pbx/Makefile b/pbx/Makefile index a74911571..795911c94 100644 --- a/pbx/Makefile +++ b/pbx/Makefile @@ -11,7 +11,7 @@ # the GNU General Public License # -.PHONY: clean clean-depend all +.PHONY: clean clean-depend all depend ifneq ($(wildcard ../menuselect.makeopts),) include ../menuselect.makeopts diff --git a/res/Makefile b/res/Makefile index 4b332194d..6b7dd3b0c 100644 --- a/res/Makefile +++ b/res/Makefile @@ -11,7 +11,7 @@ # the GNU General Public License # -.PHONY: clean clean-depend all +.PHONY: clean clean-depend all depend ifneq ($(wildcard ../menuselect.makeopts),) include ../menuselect.makeopts diff --git a/utils/Makefile b/utils/Makefile index 54e4d15ac..2432ad2fe 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -11,7 +11,7 @@ # the GNU General Public License # -.PHONY: clean clean-depend all +.PHONY: clean clean-depend all depend UTILS:=astman smsq stereorize streamplayer aelparse |