]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
more makefile tweaks to keep targets from being run when they don't need to be
authorKevin P. Fleming <kpfleming@digium.com>
Sat, 9 Sep 2006 03:27:21 +0000 (03:27 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Sat, 9 Sep 2006 03:27:21 +0000 (03:27 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42505 65c4cc65-6c06-0410-ace0-fbb531ad65f3

Makefile
Makefile.moddir_rules
Makefile.rules
agi/Makefile
utils/Makefile

index 08de69c178cbdd671f21be859ea7d74f0d295d73..4ab5ad84e23877b46539394640264d6abb62dd35 100644 (file)
--- a/Makefile
+++ b/Makefile
 
 .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):
index 82ee8e373497d83d4573e2a497876bbfa8a595fe..5f60470c86ff678e0c785f618033da9eb5275b97 100644 (file)
@@ -95,7 +95,9 @@ install:: all
 
 uninstall::
 
--include .depend
+ifneq ($(wildcard .depend),)
+  include .depend
+endif
 
 depend: .depend
 
index 02eed1fdd63a4479793524b4b50d9356dbb2bb3e..b179ae626b8b9a4555f9a8a092adb3c6f2c2f74d 100644 (file)
@@ -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=@
index 743e0b9196031e45aeb398233bff10ced0ce16c3..c2e1c200c600d26b86320bd245f47f6a1367e7f0 100644 (file)
@@ -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
 
index 86cbd3c70b03866d04aeb5f3dd3b71dfb8b2feab..d59bfec6557280b50ac206ea1b35ef9762408a3c 100644 (file)
@@ -100,7 +100,9 @@ streamplayer: streamplayer.o
 muted: muted.o
 muted: LIBS+=$(AUDIO_LIBS)
 
--include .depend
+ifneq ($(wildcard .depend),)
+  include .depend
+endif
 
 depend: .depend