From 0439aaa76a3215a48101b2622097e3eb2b2414d9 Mon Sep 17 00:00:00 2001 From: kpfleming Date: Sat, 9 Sep 2006 03:27:21 +0000 Subject: more makefile tweaks to keep targets from being run when they don't need to be git-svn-id: http://svn.digium.com/svn/asterisk/trunk@42505 f38db490-d61c-443f-a65b-d21fe96a405b --- Makefile | 16 ++++++++++------ Makefile.moddir_rules | 4 +++- Makefile.rules | 2 +- agi/Makefile | 4 +++- utils/Makefile | 4 +++- 5 files changed, 20 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 08de69c17..4ab5ad84e 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,12 @@ .EXPORT_ALL_VARIABLES: -include makeopts +# even though we could use '-include makeopts' here, use a wildcard +# lookup anyway, so that make won't try to build makeopts if it doesn't +# exist (other rules will force it to be built if needed) +ifneq ($(wildcard makeopts),) + include makeopts +endif #Uncomment this to see all build commands instead of 'quiet' output #NOISY_BUILD=yes @@ -235,9 +240,8 @@ endif all: cleantest $(SUBDIRS) @echo " +--------- Asterisk Build Complete ---------+" - @echo " + Asterisk has successfully been built, but +" - @echo " + cannot be run before being installed by +" - @echo " + running: +" + @echo " + Asterisk has successfully been built, and +" + @echo " + can be installed by running: +" @echo " + +" @echo " + make install +" @echo " +-------------------------------------------+" @@ -316,6 +320,7 @@ clean: $(SUBDIRS_CLEAN) clean-depend rm -f include/asterisk/version.h rm -f .depend @$(MAKE) -C menuselect clean + cp -f .cleancount .lastclean dist-clean: distclean @@ -604,8 +609,7 @@ sounds: cleantest: @if ! cmp -s .cleancount .lastclean ; then \ - $(MAKE) clean; cp -f .cleancount .lastclean;\ - $(MAKE) defaults.h;\ + $(MAKE) clean;\ fi $(SUBDIRS_UNINSTALL): diff --git a/Makefile.moddir_rules b/Makefile.moddir_rules index 82ee8e373..5f60470c8 100644 --- a/Makefile.moddir_rules +++ b/Makefile.moddir_rules @@ -95,7 +95,9 @@ install:: all uninstall:: --include .depend +ifneq ($(wildcard .depend),) + include .depend +endif depend: .depend diff --git a/Makefile.rules b/Makefile.rules index 02eed1fdd..b179ae626 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -15,7 +15,7 @@ # Prefixing one or the other with @\# or @ or nothing makes the desired # behaviour. ECHO_PREFIX prefixes the comment, CMD_PREFIX prefixes the command. -include $(ASTTOPDIR)/makeopts +-include $(ASTTOPDIR)/makeopts ifeq ($(NOISY_BUILD),) ECHO_PREFIX=@ diff --git a/agi/Makefile b/agi/Makefile index 743e0b919..c2e1c200c 100644 --- a/agi/Makefile +++ b/agi/Makefile @@ -40,7 +40,9 @@ clean-depend: clean: clean-depend rm -f *.so *.o look eagi-test eagi-sphinx-test --include .depend +ifneq ($(wildcard .depend),) + include .depend +endif depend: .depend diff --git a/utils/Makefile b/utils/Makefile index 86cbd3c70..d59bfec65 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -100,7 +100,9 @@ streamplayer: streamplayer.o muted: muted.o muted: LIBS+=$(AUDIO_LIBS) --include .depend +ifneq ($(wildcard .depend),) + include .depend +endif depend: .depend -- cgit v1.2.3