aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-01 21:54:41 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-01 21:54:41 +0000
commitd8dcdb07402bc898a5ab47d09b86eeb7f660fb41 (patch)
treeea84dbeb15d0a223bd2defbf5c0ceb734b04e6c2
parentca893376226bccf0bc65ad0234b6271b7c4f1242 (diff)
Merged revisions 84291 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r84291 | qwell | 2007-10-01 16:52:45 -0500 (Mon, 01 Oct 2007) | 6 lines Add dist-clean support for subdirs. Change h323 to only remove the Makefile on a dist-clean, rather than a clean. This fixes a bug I found with trying to run make after a make clean ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@84300 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--Makefile8
-rw-r--r--Makefile.rules4
-rw-r--r--channels/Makefile4
3 files changed, 13 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 943fbeb8c..558d30596 100644
--- a/Makefile
+++ b/Makefile
@@ -260,6 +260,7 @@ OTHER_SUBDIRS:=utils agi
SUBDIRS:=$(OTHER_SUBDIRS) $(MOD_SUBDIRS)
SUBDIRS_INSTALL:=$(SUBDIRS:%=%-install)
SUBDIRS_CLEAN:=$(SUBDIRS:%=%-clean)
+SUBDIRS_DIST_CLEAN:=$(SUBDIRS:%=%-dist-clean)
SUBDIRS_UNINSTALL:=$(SUBDIRS:%=%-uninstall)
MOD_SUBDIRS_EMBED_LDSCRIPT:=$(MOD_SUBDIRS:%=%-embed-ldscript)
MOD_SUBDIRS_EMBED_LDFLAGS:=$(MOD_SUBDIRS:%=%-embed-ldflags)
@@ -373,6 +374,9 @@ include/asterisk/build.h:
$(SUBDIRS_CLEAN):
@$(MAKE) --no-print-directory -C $(@:-clean=) clean
+$(SUBDIRS_DIST_CLEAN):
+ @$(MAKE) --no-print-directory -C $(@:-dist-clean=) dist-clean
+
clean: $(SUBDIRS_CLEAN)
rm -f defaults.h
rm -f include/asterisk/build.h
@@ -382,7 +386,7 @@ clean: $(SUBDIRS_CLEAN)
dist-clean: distclean
-distclean: clean
+distclean: $(SUBDIRS_DIST_CLEAN) clean
@$(MAKE) -C menuselect dist-clean
@$(MAKE) -C sounds dist-clean
rm -f menuselect.makeopts makeopts menuselect-tree menuselect.makedeps
@@ -731,4 +735,4 @@ menuselect-tree: $(foreach dir,$(filter-out main,$(MOD_SUBDIRS)),$(wildcard $(di
asterisk.pdf:
$(MAKE) -C doc/tex asterisk.pdf
-.PHONY: menuselect main sounds clean dist-clean distclean all prereqs cleantest uninstall _uninstall uninstall-all dont-optimize $(SUBDIRS_INSTALL) $(SUBDIRS_CLEAN) $(SUBDIRS_UNINSTALL) $(SUBDIRS) $(MOD_SUBDIRS_EMBED_LDSCRIPT) $(MOD_SUBDIRS_EMBED_LDFLAGS) $(MOD_SUBDIRS_EMBED_LIBS) menuselect.makeopts
+.PHONY: menuselect main sounds clean dist-clean distclean all prereqs cleantest uninstall _uninstall uninstall-all dont-optimize $(SUBDIRS_INSTALL) $(SUBDIRS_DIST_CLEAN) $(SUBDIRS_CLEAN) $(SUBDIRS_UNINSTALL) $(SUBDIRS) $(MOD_SUBDIRS_EMBED_LDSCRIPT) $(MOD_SUBDIRS_EMBED_LDFLAGS) $(MOD_SUBDIRS_EMBED_LIBS) menuselect.makeopts
diff --git a/Makefile.rules b/Makefile.rules
index e847c3af3..edb9360a4 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -17,6 +17,8 @@
-include $(ASTTOPDIR)/makeopts
+.PHONY: dist-clean
+
ifeq ($(NOISY_BUILD),)
ECHO_PREFIX=@
CMD_PREFIX=@
@@ -107,3 +109,5 @@ endif
%: %.o
$(ECHO_PREFIX) echo " [LD] $^ -> $@"
$(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(PTHREAD_CFLAGS) $(ASTLDFLAGS) $^ $(PTHREAD_LIBS) $(LIBS)
+
+dist-clean::
diff --git a/channels/Makefile b/channels/Makefile
index ca3505aa5..c2c8ddadf 100644
--- a/channels/Makefile
+++ b/channels/Makefile
@@ -68,7 +68,6 @@ ifneq ($(wildcard h323/Makefile.ast),)
H323LDFLAGS+=-Wl,--version-script=h323/noexport.map
clean::
$(MAKE) -C h323 clean
- rm -f h323/Makefile
else
h323/libchanh323.a h323/Makefile.ast:
$(CMD_PREFIX) $(MAKE) -C h323
@@ -81,6 +80,9 @@ h323/libchanh323.a h323/Makefile.ast:
$(CMD_PREFIX) exit 1
endif
+dist-clean::
+ rm -f h323/Makefile
+
gentone: gentone.c
$(ECHO_PREFIX) echo " [LD] $^ -> $@"
$(CMD_PREFIX) $(HOST_CC) $(STATIC_BUILD) -o $@ $(HOST_CFLAGS) $(HOST_LDFLAGS) $^ $(LIBS)