Bug 333308: make clean and make distclean miss various files. r=bsmedberg, a=schrep
authorjag@tty.nl
Sat, 09 Feb 2008 02:37:42 -0800
changeset 11454 15da0308f666975cc08e7a2c7e50a522eee836ed
parent 11453 ce626b2e1ced38221c5764269b2f15167e0c083a
child 11455 fd9940a1a4fb78b65295e433912c3ef3daa1dcb1
push id1
push userbsmedberg@mozilla.com
push dateThu, 20 Mar 2008 16:49:24 +0000
treeherdermozilla-central@61007906a1f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg, schrep
bugs333308
milestone1.9b4pre
Bug 333308: make clean and make distclean miss various files. r=bsmedberg, a=schrep
Makefile.in
config/Makefile.in
config/rules.mk
embedding/components/printingui/src/mac/printpde/Makefile.in
layout/style/test/Makefile.in
modules/plugin/samples/default/mac/Makefile.in
plugin/oji/JEP/Makefile.in
testing/mochitest/Makefile.in
toolkit/xre/Makefile.in
widget/src/cocoa/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
@@ -68,17 +68,17 @@ include $(topsrcdir)/$(MOZ_BUILD_APP)/bu
 
 TIERS += testharness
 
 # test harnesses
 ifdef ENABLE_TESTS
 tier_testharness_dirs += tools/test-harness
 endif
 
-GARBAGE_DIRS += dist
+GARBAGE_DIRS += dist _javagen _tests
 DIST_GARBAGE = config.cache config.log config.status config-defs.h \
    dependencies.beos config/autoconf.mk config/myrules.mk config/myconfig.mk \
    unallmakefiles mozilla-config.h \
    netwerk/necko-config.h xpcom/xpcom-config.h xpcom/xpcom-private.h \
    $(topsrcdir)/.mozconfig.mk $(topsrcdir)/.mozconfig.out
 
 # Build pseudo-external modules first when export is explicitly called
 export::
--- a/config/Makefile.in
+++ b/config/Makefile.in
@@ -122,23 +122,25 @@ export::
 		-DMOZ_TREE_CAIRO=$(MOZ_TREE_CAIRO) \
 		-DMOZ_ENABLE_LIBXUL=$(MOZ_ENABLE_LIBXUL) \
 		-DMOZ_NATIVE_ZLIB=$(MOZ_NATIVE_ZLIB) \
 		-DMOZ_NATIVE_PNG=$(MOZ_NATIVE_PNG) \
 		-DMOZ_NATIVE_JPEG=$(MOZ_NATIVE_JPEG) \
 		-DMOZ_NATIVE_LCMS=$(MOZ_NATIVE_LCMS) \
 		$(srcdir)/system-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers
 	$(INSTALL) system_wrappers $(DIST)/include
+
+GARBAGE_DIRS += system_wrappers
 endif
 
 install::
 	$(SYSINSTALL) $(IFLAGS1) $(DEPTH)/mozilla-config.h $(DESTDIR)$(includedir)
 
 GARBAGE += \
-	$(FINAL_LINK_COMPS) $(FINAL_LINK_LIBS) $(FINAL_LINK_COMP_NAMES)
+	$(FINAL_LINK_COMPS) $(FINAL_LINK_LIBS) $(FINAL_LINK_COMP_NAMES) buildid
 
 ifndef CROSS_COMPILE
 ifdef USE_ELF_DYNSTR_GC
 elf-dynstr-gc: elf-dynstr-gc.c Makefile Makefile.in
 	$(CC) $(COMPILE_CFLAGS) $(GLIB_CFLAGS) -o $@ $< $(LDFLAGS) $(GLIB_LIBS) 
 endif
 endif
 
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -114,16 +114,17 @@ EXPAND_MOZLIBNAME = $(addprefix -l,$(1))
 endif
 
 ifdef EXTRA_DSO_LIBS
 EXTRA_DSO_LIBS	:= $(call EXPAND_MOZLIBNAME,$(EXTRA_DSO_LIBS))
 endif
 
 ifdef GQI_SRCS
 CPPSRCS += $(GQI_SRCS:.gqi=QI.cpp)
+GARBAGE += $(GQI_SRCS:.gqi=QI.cpp)
 endif
 
 #
 # Library rules
 #
 # If BUILD_STATIC_LIBS or FORCE_STATIC_LIB is set, build a static library.
 # Otherwise, build a shared library.
 #
@@ -367,16 +368,20 @@ ifdef MOZ_UPDATE_XTERM
 # platforms, but we can trick sed into doing it.
 UPDATE_TITLE = sed -e "s!Y!$@ in $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$(dir)!" $(MOZILLA_DIR)/config/xterm.str;
 endif
 
 LOOP_OVER_DIRS = \
     @$(EXIT_ON_ERROR) \
     $(foreach dir,$(DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; ) true
 
+LOOP_OVER_STATIC_DIRS = \
+    @$(EXIT_ON_ERROR) \
+    $(foreach dir,$(STATIC_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; ) true
+
 LOOP_OVER_TOOL_DIRS = \
     @$(EXIT_ON_ERROR) \
     $(foreach dir,$(TOOL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; ) true
 
 #
 # Now we can differentiate between objects used to build a library, and
 # objects used to build an executable in the same directory.
 #
@@ -786,22 +791,23 @@ run_viewer: $(FINAL_TARGET)/viewer
 	cd $(FINAL_TARGET); \
 	MOZILLA_FIVE_HOME=`pwd` \
 	LD_LIBRARY_PATH=".:$(LIBS_PATH):$$LD_LIBRARY_PATH" \
 	viewer
 
 clean clobber realclean clobber_all:: $(SUBMAKEFILES)
 	-rm -f $(ALL_TRASH)
 	-rm -rf $(ALL_TRASH_DIRS)
-	+-$(foreach dir,$(STATIC_DIRS),$(MAKE) -C $(dir) $@; )
 	+-$(LOOP_OVER_DIRS)
+	+-$(LOOP_OVER_STATIC_DIRS)
 	+-$(LOOP_OVER_TOOL_DIRS)
 
 distclean:: $(SUBMAKEFILES)
 	+-$(LOOP_OVER_DIRS)
+	+-$(LOOP_OVER_STATIC_DIRS)
 	+-$(LOOP_OVER_TOOL_DIRS)
 	-rm -rf $(ALL_TRASH_DIRS) 
 	-rm -f $(ALL_TRASH)  \
 	Makefile .HSancillary \
 	$(wildcard *.$(OBJ_SUFFIX)) $(wildcard *.ho) $(wildcard host_*.o*) \
 	$(wildcard *.$(LIB_SUFFIX)) $(wildcard *$(DLL_SUFFIX)) \
 	$(wildcard *.$(IMPORT_LIB_SUFFIX))
 ifeq ($(MOZ_OS2_TOOLS),VACPP)
--- a/embedding/components/printingui/src/mac/printpde/Makefile.in
+++ b/embedding/components/printingui/src/mac/printpde/Makefile.in
@@ -71,17 +71,19 @@ unexport CC CXX
 ABS_topsrcdir   := $(shell cd $(topsrcdir); pwd)
 ifneq ($(ABS_topsrcdir),$(MOZ_BUILD_ROOT))
 export::
 	rsync -a --exclude .DS_Store --exclude "CVS/" $(srcdir)/$(PROJECT) .
 	ln -fs $(srcdir)/src
 	ln -fs $(srcdir)/res
 	ln -fs $(srcdir)/public
 	ln -fs $(srcdir)/Info-*.plist .
+
+GARBAGE += src res public Info-*.plist
+GARBAGE_DIRS += $(PROJECT)
 endif
 
+GARBAGE_DIRS += build
+
 libs::
 	$(PBBUILD) $(PROJECT_ARG) -target PrintPDE -buildstyle $(BUILDSTYLE) $(PBBUILD_ARG)
 	mkdir -p $(DIST)/package
 	$(INSTALL) $(XCODE_PRODUCT_DIR)/PrintPDE.plugin $(DIST)/package
-
-clean clobber::
-	rm -rf build
--- a/layout/style/test/Makefile.in
+++ b/layout/style/test/Makefile.in
@@ -61,16 +61,18 @@ HOST_SIMPLE_PROGRAMS	= $(addprefix host_
 
 include $(topsrcdir)/config/rules.mk
 
 css_properties.js: host_ListCSSProperties$(HOST_BIN_SUFFIX) css_properties_like_longhand.js Makefile
 	$(RM) $@
 	./host_ListCSSProperties$(HOST_BIN_SUFFIX) > $@
 	cat $(srcdir)/css_properties_like_longhand.js >> $@
 
+GARBAGE += css_properties.js
+
 _TEST_FILES =	test_bug74880.html \
 		test_bug221428.html \
 		test_bug302186.html \
 		test_bug319381.html \
 		test_bug357614.html \
 		test_bug363146.html \
 		test_bug365932.html \
 		test_bug372770.html \
--- a/modules/plugin/samples/default/mac/Makefile.in
+++ b/modules/plugin/samples/default/mac/Makefile.in
@@ -67,21 +67,30 @@ ifneq ($(ABS_topsrcdir),$(MOZ_BUILD_ROOT
 export::
 	rsync -a --exclude .DS_Store --exclude "CVS/" $(srcdir)/$(PROJECT) .
 	ln -fs $(srcdir)/English.lproj
 	ln -fs $(srcdir)/DefaultPluginPrefix.h
 	ln -fs $(srcdir)/NullPlugin.cpp
 	ln -fs $(srcdir)/npmac.cpp
 	ln -fs $(srcdir)/Info-*.plist .
 	ln -fs $(srcdir)/NullPlugin.rsrc
+
+GARBAGE_DIRS += $(PROJECT)
+GARBAGE += \
+	English.lproj \
+	DefaultPluginPrefix.h \
+	NullPlugin.cpp \
+	npmac.cpp \
+	Info-*.plist \
+	NullPlugin.rsrc \
+	$(NULL)
 endif
 
+GARBAGE_DIRS += build
+
 libs install:: install-plugin
 
 install-plugin: build-plugin
 	$(INSTALL) "$(XCODE_PRODUCT_DIR)/Default Plugin.plugin" $(DIST)/bin/plugins
 
 build-plugin:
 	$(PBBUILD) $(PROJECT_ARG) -target $(TARGET) -buildstyle $(BUILDSTYLE) $(PBBUILD_ARG)
 	echo -n NSPLMOSS > "$(XCODE_PRODUCT_DIR)/Default Plugin.plugin/Contents/PkgInfo"
-
-clean clobber distclean::
-	rm -rf build
--- a/plugin/oji/JEP/Makefile.in
+++ b/plugin/oji/JEP/Makefile.in
@@ -50,24 +50,24 @@ TARGET		= "JEP Plugin"
 unexport CC CXX
 
 JEP_PLUGIN_BUNDLE=JavaEmbeddingPlugin.bundle
 MRJ_PLUGIN_BUNDLE=MRJPlugin.plugin
 
 # for objdir builds, copy the project, and symlink the sources
 ABS_topsrcdir   := $(shell cd $(topsrcdir); pwd)
 ifneq ($(ABS_topsrcdir),$(MOZ_BUILD_ROOT))
+ifdef MOZ_PLUGINS
 export::
-ifdef MOZ_PLUGINS
 	rsync -a --exclude CVS/ $(srcdir)/$(JEP_PLUGIN_BUNDLE) .
 	rsync -a --exclude CVS/ $(srcdir)/$(MRJ_PLUGIN_BUNDLE) .
+
+GARBAGE_DIRS += $(JEP_PLUGIN_BUNDLE) $(MRJ_PLUGIN_BUNDLE)
 endif
 endif
 
 libs install:: install-plugin
 
 install-plugin: 
 ifdef MOZ_PLUGINS
 	$(INSTALL) $(JEP_PLUGIN_BUNDLE) $(DIST)/bin/plugins
 	$(INSTALL) $(MRJ_PLUGIN_BUNDLE) $(DIST)/bin/plugins
 endif
-
-clean clobber distclean::
--- a/testing/mochitest/Makefile.in
+++ b/testing/mochitest/Makefile.in
@@ -103,11 +103,12 @@ endif
 runtests.pl: runtests.pl.in
 	$(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py \
 	$(TEST_DRIVER_PPARGS) $(DEFINES) $(ACDEFINES) $^ > $@
 
 runtests.py: runtests.py.in
 	$(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py \
 	$(TEST_DRIVER_PPARGS) $(DEFINES) $(ACDEFINES) $^ > $@
 
+GARBAGE += runtests.pl runtests.py
 
 libs:: $(_SERV_FILES)
 	$(INSTALL) $^ $(_DEST_DIR)
--- a/toolkit/xre/Makefile.in
+++ b/toolkit/xre/Makefile.in
@@ -248,13 +248,15 @@ endif
 endif
 
 export:: $(addprefix $(topsrcdir)/xpfe/bootstrap/, $(SHAREDCPPSRCS))
 	$(INSTALL) $^ .
 
 platform.ini: FORCE
 	$(PYTHON) $(srcdir)/make-platformini.py --buildid=$(shell cat $(DEPTH)/config/buildid) $(topsrcdir)/config/milestone.txt > $@
 
+GARBAGE += platform.ini
+
 libs:: platform.ini
 	$(INSTALL) $^ $(DIST)/bin
 
 install::
 	$(INSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)
--- a/widget/src/cocoa/Makefile.in
+++ b/widget/src/cocoa/Makefile.in
@@ -161,16 +161,18 @@ export::
 endif
 
 export::
 	$(INSTALL) $(srcdir)/cursors $(DIST)/bin/res
 
 $(RESOURCE): nsMacWidget.r
 	/Developer/Tools/Rez -i /Developer/Headers/FlatCarbon -useDF $< -o $@
 
+GARBAGE += $(RESOURCE)
+
 libs:: $(RESOURCE)
 	$(INSTALL) $(IFLAGS1) $^ $(DIST)/bin
 
 LOCAL_INCLUDES	= \
 	$(TK_CFLAGS) \
 	-I$(srcdir)/../xpwidgets \
 	$(NULL)