diff --git a/config/rules.mk b/config/rules.mk index b7a612b43be..04f7bbf8c68 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -1709,3 +1709,7 @@ include $(topsrcdir)/config/makefiles/autotargets.mk ifneq ($(NULL),$(AUTO_DEPS)) default all libs tools export:: $(AUTO_DEPS) endif + +export:: $(GENERATED_FILES) + +GARBAGE += $(GENERATED_FILES) diff --git a/dom/encoding/Makefile.in b/dom/encoding/Makefile.in index 4f64200b823..21c71af311e 100644 --- a/dom/encoding/Makefile.in +++ b/dom/encoding/Makefile.in @@ -4,16 +4,8 @@ include $(topsrcdir)/config/rules.mk -EncodingUtils.$(OBJ_SUFFIX): labelsencodings.properties.h -FallbackEncoding.$(OBJ_SUFFIX): localesfallbacks.properties.h - PROPS2ARRAYS = $(topsrcdir)/intl/locale/src/props2arrays.py labelsencodings.properties.h: $(PROPS2ARRAYS) labelsencodings.properties $(PYTHON) $^ $@ localesfallbacks.properties.h: $(PROPS2ARRAYS) localesfallbacks.properties $(PYTHON) $^ $@ - -GARBAGE += \ - labelsencodings.properties.h \ - localesfallbacks.properties.h \ - $(NULL) diff --git a/dom/encoding/moz.build b/dom/encoding/moz.build index 8001bb33dbd..96b6777f0b0 100644 --- a/dom/encoding/moz.build +++ b/dom/encoding/moz.build @@ -30,3 +30,7 @@ LOCAL_INCLUDES += [ '/intl/locale/src', ] +GENERATED_FILES += [ + 'labelsencodings.properties.h', + 'localesfallbacks.properties.h', +] diff --git a/gfx/thebes/Makefile.in b/gfx/thebes/Makefile.in index 4b246a7361e..666efb63cb9 100644 --- a/gfx/thebes/Makefile.in +++ b/gfx/thebes/Makefile.in @@ -79,5 +79,3 @@ endif PremultiplyTables.h: $(srcdir)/genTables.py $(PYTHON) $(srcdir)/genTables.py - -gfxUtils.$(OBJ_SUFFIX): PremultiplyTables.h diff --git a/gfx/thebes/moz.build b/gfx/thebes/moz.build index 9617be293ba..74c9cac2ef2 100644 --- a/gfx/thebes/moz.build +++ b/gfx/thebes/moz.build @@ -279,3 +279,7 @@ LIBRARY_NAME = 'thebes' include('/ipc/chromium/chromium-config.mozbuild') FINAL_LIBRARY = 'xul' + +GENERATED_FILES = [ + 'PremultiplyTables.h', +] diff --git a/intl/locale/src/Makefile.in b/intl/locale/src/Makefile.in index dd3d51079e1..c04e9fff23d 100644 --- a/intl/locale/src/Makefile.in +++ b/intl/locale/src/Makefile.in @@ -19,14 +19,8 @@ LOCAL_INCLUDES = \ include $(topsrcdir)/config/rules.mk -nsCharsetAlias.$(OBJ_SUFFIX): charsetalias.properties.h - charsetalias.properties.h: props2arrays.py charsetalias.properties $(PYTHON) $^ $@ -GARBAGE += \ - charsetalias.properties.h \ - $(NULL) - libs:: $(INSTALL) $(EXPORT_RESOURCE) $(DIST)/bin/res diff --git a/intl/locale/src/moz.build b/intl/locale/src/moz.build index 91835bcf55b..1ba9fcc4d50 100644 --- a/intl/locale/src/moz.build +++ b/intl/locale/src/moz.build @@ -34,3 +34,7 @@ EXTRA_JS_MODULES += [ MSVC_ENABLE_PGO = True FINAL_LIBRARY = 'i18n' + +GENERATED_FILES = [ + 'charsetalias.properties.h', +] diff --git a/intl/locale/src/os2/Makefile.in b/intl/locale/src/os2/Makefile.in index 4bc875a3765..77005f21229 100644 --- a/intl/locale/src/os2/Makefile.in +++ b/intl/locale/src/os2/Makefile.in @@ -7,11 +7,5 @@ include $(topsrcdir)/config/rules.mk INCLUDES += -I$(srcdir)/.. -nsOS2Charset.$(OBJ_SUFFIX): os2charset.properties.h - os2charset.properties.h: $(srcdir)/../props2arrays.py os2charset.properties $(PYTHON) $^ $@ - -GARBAGE += \ - os2charset.properties.h \ - $(NULL) diff --git a/intl/locale/src/os2/moz.build b/intl/locale/src/os2/moz.build index d3e3b341b10..7ae4d4cc7e7 100644 --- a/intl/locale/src/os2/moz.build +++ b/intl/locale/src/os2/moz.build @@ -12,3 +12,7 @@ SOURCES += [ ] FINAL_LIBRARY = 'i18n' + +GENERATED_FILES = [ + 'os2charset.properties.h', +] diff --git a/intl/locale/src/unix/Makefile.in b/intl/locale/src/unix/Makefile.in index 22d86ca3942..aab47c26250 100644 --- a/intl/locale/src/unix/Makefile.in +++ b/intl/locale/src/unix/Makefile.in @@ -16,11 +16,5 @@ endif DEFINES += -DOSTYPE=\"$(OS_CONFIG)\" -nsUNIXCharset.$(OBJ_SUFFIX): unixcharset.properties.h - unixcharset.properties.h: $(srcdir)/../props2arrays.py unixcharset.properties $(PYTHON) $^ $@ - -GARBAGE += \ - unixcharset.properties.h \ - $(NULL) diff --git a/intl/locale/src/unix/moz.build b/intl/locale/src/unix/moz.build index 4e88fb37ad7..df6c6f30574 100644 --- a/intl/locale/src/unix/moz.build +++ b/intl/locale/src/unix/moz.build @@ -20,3 +20,7 @@ else: ] FINAL_LIBRARY = 'i18n' + +GENERATED_FILES = [ + 'unixcharset.properties.h', +] diff --git a/intl/locale/src/windows/Makefile.in b/intl/locale/src/windows/Makefile.in index d432c3df3bc..2391423604d 100644 --- a/intl/locale/src/windows/Makefile.in +++ b/intl/locale/src/windows/Makefile.in @@ -7,11 +7,5 @@ include $(topsrcdir)/config/rules.mk INCLUDES += -I$(srcdir)/.. -nsWinCharset.$(OBJ_SUFFIX): wincharset.properties.h - wincharset.properties.h: $(srcdir)/../props2arrays.py wincharset.properties $(PYTHON) $^ $@ - -GARBAGE += \ - wincharset.properties.h \ - $(NULL) diff --git a/intl/locale/src/windows/moz.build b/intl/locale/src/windows/moz.build index 223ee3d3b12..134dc82026a 100644 --- a/intl/locale/src/windows/moz.build +++ b/intl/locale/src/windows/moz.build @@ -12,3 +12,7 @@ SOURCES += [ ] FINAL_LIBRARY = 'i18n' + +GENERATED_FILES = [ + 'wincharset.properties.h', +] diff --git a/js/src/Makefile.in b/js/src/Makefile.in index cc7e38adadc..55a641b7001 100644 --- a/js/src/Makefile.in +++ b/js/src/Makefile.in @@ -606,8 +606,6 @@ ifdef MOZ_ETW ETWProvider.h ETWProvider.rc ETWProvider.mof: ETWProvider.man $(MC) -um -mof $^ -Probes.$(OBJ_SUFFIX): ETWProvider.h - ETWProvider.res: ETWProvider.rc $(RC) -r -i "$(SDKDIR)Include" $^ diff --git a/js/src/config/rules.mk b/js/src/config/rules.mk index b7a612b43be..04f7bbf8c68 100644 --- a/js/src/config/rules.mk +++ b/js/src/config/rules.mk @@ -1709,3 +1709,7 @@ include $(topsrcdir)/config/makefiles/autotargets.mk ifneq ($(NULL),$(AUTO_DEPS)) default all libs tools export:: $(AUTO_DEPS) endif + +export:: $(GENERATED_FILES) + +GARBAGE += $(GENERATED_FILES) diff --git a/js/src/moz.build b/js/src/moz.build index a2c210ca9c3..6c1b7a271d5 100644 --- a/js/src/moz.build +++ b/js/src/moz.build @@ -391,3 +391,8 @@ if CONFIG['JS_SHARED_LIBRARY']: FORCE_SHARED_LIB = True FORCE_STATIC_LIB = True + +if CONFIG['MOZ_ETW']: + GENERATED_FILES = [ + 'ETWProvider.h', + ] diff --git a/js/xpconnect/src/Makefile.in b/js/xpconnect/src/Makefile.in index 25e45744214..dc3f3a3515f 100644 --- a/js/xpconnect/src/Makefile.in +++ b/js/xpconnect/src/Makefile.in @@ -63,10 +63,6 @@ ifdef MOZ_JSDEBUGGER DEFINES += -DMOZ_JSDEBUGGER endif -nsXPConnect.$(OBJ_SUFFIX): dom_quickstubs.h - -XPCJSRuntime.$(OBJ_SUFFIX): dom_quickstubs.h - dom_quickstubs.h: dom_quickstubs.cpp dom_quickstubs.cpp: $(srcdir)/dom_quickstubs.qsconf \ @@ -84,8 +80,6 @@ dom_quickstubs.cpp: $(srcdir)/dom_quickstubs.qsconf \ $(ENABLE_TRACEABLE_FLAGS) \ $(srcdir)/dom_quickstubs.qsconf -DictionaryHelpers.$(OBJ_SUFFIX): DictionaryHelpers.cpp - DictionaryHelpers.h: DictionaryHelpers.cpp DictionaryHelpers.cpp: $(srcdir)/dictionary_helper_gen.conf \ @@ -104,9 +98,6 @@ DictionaryHelpers.cpp: $(srcdir)/dictionary_helper_gen.conf \ $(srcdir)/dictionary_helper_gen.conf \ event_impl_gen.conf -GeneratedEvents.$(OBJ_SUFFIX): GeneratedEvents.h \ - GeneratedEvents.cpp - event_impl_gen.conf : $(srcdir)/event_impl_gen.conf.in $(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) $^ -o event_impl_gen.conf) @@ -154,13 +145,6 @@ GeneratedEvents-webidl: event_impl_gen.conf event_impl_gen.conf GARBAGE += \ - dom_quickstubs.h \ - dom_quickstubs.cpp \ - DictionaryHelpers.h \ - DictionaryHelpers.cpp \ - GeneratedEvents.h \ - GeneratedEvents.cpp \ - GeneratedEventClasses.h \ event_impl_gen.conf \ xpidl_debug \ $(MDDEPDIR)/dom_qsgen.pp \ diff --git a/js/xpconnect/src/moz.build b/js/xpconnect/src/moz.build index 00bd0962703..f429b521bd4 100644 --- a/js/xpconnect/src/moz.build +++ b/js/xpconnect/src/moz.build @@ -63,3 +63,10 @@ LIBRARY_NAME = 'xpconnect_s' include('/ipc/chromium/chromium-config.mozbuild') FINAL_LIBRARY = 'gklayout' + +GENERATED_FILES = [ + 'DictionaryHelpers.h', + 'dom_quickstubs.h', + 'GeneratedEventClasses.h', + 'GeneratedEvents.h', +] diff --git a/media/libjpeg/Makefile.in b/media/libjpeg/Makefile.in index c9169a0be80..0ef11ad558e 100644 --- a/media/libjpeg/Makefile.in +++ b/media/libjpeg/Makefile.in @@ -16,5 +16,3 @@ include $(topsrcdir)/config/rules.mk jpeg_nbits_table.h: $(srcdir)/genTables.py $(PYTHON) $(srcdir)/genTables.py - -jchuff.$(OBJ_SUFFIX): jpeg_nbits_table.h diff --git a/media/libjpeg/moz.build b/media/libjpeg/moz.build index 80cefc63fa5..d78abb9b321 100644 --- a/media/libjpeg/moz.build +++ b/media/libjpeg/moz.build @@ -150,3 +150,7 @@ if CONFIG['OS_TARGET'] == 'WINNT': NO_VISIBILITY_FLAGS = True FINAL_LIBRARY = 'gkmedias' + +GENERATED_FILES = [ + 'jpeg_nbits_table.h', +] diff --git a/netwerk/dns/Makefile.in b/netwerk/dns/Makefile.in index 296accc9523..17ce63846b8 100644 --- a/netwerk/dns/Makefile.in +++ b/netwerk/dns/Makefile.in @@ -13,10 +13,5 @@ include $(topsrcdir)/config/rules.mk # Generate the include file containing compact, static definitions # for effective TLD data. -nsEffectiveTLDService.$(OBJ_SUFFIX): etld_data.inc -nsEffectiveTLDService.h: etld_data.inc - etld_data.inc: $(srcdir)/prepare_tlds.py $(srcdir)/effective_tld_names.dat $(PYTHON) $(srcdir)/prepare_tlds.py $(srcdir)/effective_tld_names.dat > etld_data.inc - -GARBAGE += etld_data.inc diff --git a/netwerk/dns/moz.build b/netwerk/dns/moz.build index b2a76ca86cc..261b16dd20f 100644 --- a/netwerk/dns/moz.build +++ b/netwerk/dns/moz.build @@ -38,3 +38,7 @@ FAIL_ON_WARNINGS = True MSVC_ENABLE_PGO = True FINAL_LIBRARY = 'necko' + +GENERATED_FILES = [ + 'etld_data.inc', +] diff --git a/parser/expat/lib/Makefile.in b/parser/expat/lib/Makefile.in index 3ef228247fe..84a0aadf0a8 100644 --- a/parser/expat/lib/Makefile.in +++ b/parser/expat/lib/Makefile.in @@ -4,6 +4,4 @@ include $(topsrcdir)/config/rules.mk -xmltok.$(OBJ_SUFFIX): moz_extensions.c - DEFINES += -DHAVE_EXPAT_CONFIG_H diff --git a/parser/expat/lib/moz.build b/parser/expat/lib/moz.build index a529c191264..326fdd892f7 100644 --- a/parser/expat/lib/moz.build +++ b/parser/expat/lib/moz.build @@ -18,3 +18,7 @@ SOURCES += [ MSVC_ENABLE_PGO = True FINAL_LIBRARY = 'gkmedias' + +GENERATED_FILES = [ + 'moz_extensions.c', +] diff --git a/python/mozbuild/mozbuild/frontend/emitter.py b/python/mozbuild/mozbuild/frontend/emitter.py index 585dc41421b..565260d77e6 100644 --- a/python/mozbuild/mozbuild/frontend/emitter.py +++ b/python/mozbuild/mozbuild/frontend/emitter.py @@ -202,6 +202,7 @@ class TreeMetadataEmitter(LoggingMixin): FILES_PER_UNIFIED_FILE='FILES_PER_UNIFIED_FILE', FORCE_SHARED_LIB='FORCE_SHARED_LIB', FORCE_STATIC_LIB='FORCE_STATIC_LIB', + GENERATED_FILES='GENERATED_FILES', HOST_LIBRARY_NAME='HOST_LIBRARY_NAME', IS_COMPONENT='IS_COMPONENT', JS_MODULES_PATH='JS_MODULES_PATH', diff --git a/python/mozbuild/mozbuild/frontend/sandbox_symbols.py b/python/mozbuild/mozbuild/frontend/sandbox_symbols.py index 8022dc7f4a3..c5d7c689d0a 100644 --- a/python/mozbuild/mozbuild/frontend/sandbox_symbols.py +++ b/python/mozbuild/mozbuild/frontend/sandbox_symbols.py @@ -108,6 +108,14 @@ VARIABLES = { and reduce the debug info size. """, 'compile'), + 'GENERATED_FILES': (StrictOrderingOnAppendList, list, [], + """Generic generated files. + + This variable contains a list of generate files for the build system + to generate at export time. The rules for those files still live in + Makefile.in. + """, 'export'), + 'DEFINES': (OrderedDict, dict, OrderedDict(), """Dictionary of compiler defines to declare. diff --git a/toolkit/components/telemetry/Makefile.in b/toolkit/components/telemetry/Makefile.in index cef2d8e7ff7..b21fd09f7f6 100644 --- a/toolkit/components/telemetry/Makefile.in +++ b/toolkit/components/telemetry/Makefile.in @@ -49,6 +49,4 @@ $(histogram_enum_file): $(histograms_file) $(enum_python_deps) $(histogram_data_file): $(histograms_file) $(data_python_deps) $(PYTHON) $(srcdir)/gen-histogram-data.py $< > $@ -Telemetry.$(OBJ_SUFFIX): $(histogram_data_file) - -GARBAGE += $(histogram_data_file) $(histogram_enum_file) +GARBAGE += $(histogram_enum_file) diff --git a/toolkit/components/telemetry/moz.build b/toolkit/components/telemetry/moz.build index 878d70abaa3..58b39ccc78f 100644 --- a/toolkit/components/telemetry/moz.build +++ b/toolkit/components/telemetry/moz.build @@ -44,3 +44,7 @@ MSVC_ENABLE_PGO = True include('/ipc/chromium/chromium-config.mozbuild') FINAL_LIBRARY = 'xul' + +GENERATED_FILES = [ + 'TelemetryHistogramData.inc', +] diff --git a/xpcom/reflect/xptcall/src/md/unix/Makefile.in b/xpcom/reflect/xptcall/src/md/unix/Makefile.in index 35619db23d7..ba0468dbe91 100644 --- a/xpcom/reflect/xptcall/src/md/unix/Makefile.in +++ b/xpcom/reflect/xptcall/src/md/unix/Makefile.in @@ -164,10 +164,6 @@ xptcstubsdef_asm.solx86: $(DIST)/include/xptcstubsdef.inc $(DIST)/include/xptcstubsdef.inc > $@ ifeq (x86_64,$(OS_TEST)) ASFLAGS += -xarch=amd64 - -xptcstubs_asm_x86_64_solaris_SUNW.$(OBJ_SUFFIX): xptcstubsdef_asm.solx86 -else -xptcstubs_asm_x86_solaris_SUNW.$(OBJ_SUFFIX): xptcstubsdef_asm.solx86 endif endif diff --git a/xpcom/reflect/xptcall/src/md/unix/moz.build b/xpcom/reflect/xptcall/src/md/unix/moz.build index 20ea2b86bec..9a1a99243bf 100644 --- a/xpcom/reflect/xptcall/src/md/unix/moz.build +++ b/xpcom/reflect/xptcall/src/md/unix/moz.build @@ -281,6 +281,9 @@ if CONFIG['OS_ARCH'] == 'OpenBSD' and CONFIG['OS_TEST'] == 'sparc64': ] if CONFIG['OS_ARCH'] == 'SunOS' and CONFIG['OS_TEST'].find('86') == -1: + GENERATED_FILES = [ + 'xptcstubsdef_asm.solx86', + ] if CONFIG['HAVE_64BIT_OS']: SOURCES += [ 'xptcinvoke_sparcv9_solaris.cpp',