From 9bfbfb549627a530fcacecae31eca5f4bbc0c23d Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Sat, 15 Nov 2008 19:31:03 +0000 Subject: [PATCH] when an individual directory dist-clean is run, run clean in that directory first, and when running top-level dist-clean, do not run subdirectory clean operations twice git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@157163 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- Makefile | 8 +++++--- Makefile.rules | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index c8c8911bbb..16b69e6077 100644 --- a/Makefile +++ b/Makefile @@ -373,7 +373,9 @@ $(SUBDIRS_CLEAN): $(SUBDIRS_DIST_CLEAN): @$(MAKE) --no-print-directory -C $(@:-dist-clean=) dist-clean -clean: $(SUBDIRS_CLEAN) +clean: $(SUBDIRS_CLEAN) _clean + +_clean: rm -f defaults.h rm -f include/asterisk/build.h rm -f include/asterisk/version.h @@ -382,7 +384,7 @@ clean: $(SUBDIRS_CLEAN) dist-clean: distclean -distclean: $(SUBDIRS_DIST_CLEAN) 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 @@ -758,6 +760,6 @@ menuselect-tree: $(foreach dir,$(filter-out main,$(MOD_SUBDIRS)),$(wildcard $(di @cat sounds/sounds.xml >> $@ @echo "" >> $@ -.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) badshell menuselect.makeopts installdirs +.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) badshell menuselect.makeopts installdirs _clean FORCE: diff --git a/Makefile.rules b/Makefile.rules index 5bad2a1cb9..2d66c7a3ea 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -78,4 +78,4 @@ endif $(ECHO_PREFIX) echo " [LD] $^ -> $@" $(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(PTHREAD_CFLAGS) $(ASTLDFLAGS) $^ $(PTHREAD_LIBS) $(LIBS) -dist-clean:: +dist-clean:: clean -- 2.47.3