Merge build-system into inbound
authorGregory Szorc <gps@mozilla.com>
Sat, 02 Mar 2013 17:47:48 -0800
changeset 123602 54d17ee1b6be1aa6463d87189a3e91c358fde96b
parent 123596 82d62fac2ac69c95f43722fa65a8ef80b836bff8 (current diff)
parent 123601 a99e75c889ed5409d1195fcad5503aed6cafc315 (diff)
child 123603 d22db499ca12cfb986f615a7132b8cfa0ef16e9f
push idunknown
push userunknown
push dateunknown
milestone22.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge build-system into inbound
b2g/branding/official/Makefile.in
b2g/branding/official/content/Makefile.in
b2g/branding/unofficial/Makefile.in
b2g/branding/unofficial/content/Makefile.in
browser/components/certerror/Makefile.in
browser/components/downloads/Makefile.in
browser/components/feeds/Makefile.in
browser/components/migration/Makefile.in
browser/components/safebrowsing/Makefile.in
browser/components/search/Makefile.in
browser/components/shell/Makefile.in
browser/devtools/Makefile.in
browser/devtools/layoutview/Makefile.in
browser/devtools/shared/Browser.jsm
browser/devtools/shared/test/browser_browser_basic.js
browser/fuel/Makefile.in
browser/themes/Makefile.in
browser/themes/linux/communicator/Makefile.in
browser/themes/osx/communicator/Makefile.in
browser/themes/windows/communicator/Makefile.in
chrome/Makefile.in
content/base/Makefile.in
content/canvas/Makefile.in
content/events/Makefile.in
content/html/Makefile.in
content/html/content/Makefile.in
content/html/document/Makefile.in
content/svg/Makefile.in
content/svg/content/Makefile.in
content/xbl/Makefile.in
content/xbl/builtin/Makefile.in
content/xbl/builtin/emacs/Makefile.in
content/xbl/builtin/mac/Makefile.in
content/xbl/builtin/unix/Makefile.in
content/xbl/builtin/win/Makefile.in
content/xml/Makefile.in
content/xml/document/Makefile.in
content/xml/document/resources/Makefile.in
content/xslt/Makefile.in
content/xslt/src/Makefile.in
content/xslt/tests/buster/Makefile.in
content/xul/Makefile.in
dbm/Makefile.in
docshell/resources/content/Makefile.in
dom/activities/Makefile.in
dom/apps/Makefile.in
dom/cellbroadcast/Makefile.in
dom/cellbroadcast/tests/Makefile.in
dom/icc/Makefile.in
dom/identity/tests/Makefile.in
dom/network/Makefile.in
dom/src/Makefile.in
dom/tests/mochitest/Makefile.in
dom/tests/mochitest/ajax/Makefile.in
dom/workers/test/extensions/Makefile.in
editor/libeditor/Makefile.in
embedding/browser/Makefile.in
embedding/components/Makefile.in
embedding/components/printingui/src/Makefile.in
embedding/components/windowwatcher/Makefile.in
extensions/Makefile.in
extensions/pref/Makefile.in
gfx/cairo/Makefile.in
image/encoders/Makefile.in
intl/Makefile.in
intl/chardet/Makefile.in
ipc/Makefile.in
ipc/ipdl/test/Makefile.in
layout/style/xbl-marquee/Makefile.in
layout/tools/layout-debug/ui/Makefile.in
media/libjpeg/simd/Makefile.in
memory/Makefile.in
memory/replace/Makefile.in
mobile/android/branding/aurora/Makefile.in
mobile/android/branding/beta/Makefile.in
mobile/android/branding/nightly/Makefile.in
mobile/android/branding/official/Makefile.in
mobile/android/branding/unofficial/Makefile.in
mobile/android/themes/core/Makefile.in
mobile/xul/branding/aurora/Makefile.in
mobile/xul/branding/beta/Makefile.in
mobile/xul/branding/nightly/Makefile.in
mobile/xul/branding/official/Makefile.in
mobile/xul/branding/unofficial/Makefile.in
mobile/xul/themes/core/Makefile.in
mozglue/Makefile.in
parser/htmlparser/tests/Makefile.in
parser/xml/Makefile.in
rdf/base/Makefile.in
rdf/datasource/Makefile.in
security/manager/Makefile.in
security/manager/pki/resources/Makefile.in
services/Makefile.in
testing/marionette/atoms/Makefile.in
testing/mochitest/tests/MochiKit-1.4.2/Makefile.in
toolkit/components/aboutmemory/Makefile.in
toolkit/components/apppicker/Makefile.in
toolkit/components/cookie/Makefile.in
toolkit/components/help/Makefile.in
toolkit/components/jsdownloads/Makefile.in
toolkit/components/printing/Makefile.in
toolkit/components/prompts/Makefile.in
toolkit/components/viewconfig/Makefile.in
toolkit/components/viewsource/Makefile.in
toolkit/identity/tests/mochitest/Makefile.in
toolkit/mozapps/preferences/Makefile.in
toolkit/obsolete/Makefile.in
toolkit/themes/Makefile.in
toolkit/themes/faststripe/global/Makefile.in
toolkit/themes/linux/Makefile.in
toolkit/themes/linux/global/Makefile.in
toolkit/themes/linux/help/Makefile.in
toolkit/themes/linux/mozapps/Makefile.in
toolkit/themes/os2/global/Makefile.in
toolkit/themes/osx/Makefile.in
toolkit/themes/osx/global/Makefile.in
toolkit/themes/osx/help/Makefile.in
toolkit/themes/osx/mozapps/Makefile.in
toolkit/themes/windows/Makefile.in
toolkit/themes/windows/global/Makefile.in
toolkit/themes/windows/help/Makefile.in
toolkit/themes/windows/mozapps/Makefile.in
toolkit/toolkit-tiers.mk
uriloader/Makefile.in
webapprt/test/Makefile.in
widget/windows/tests/Makefile.in
xpcom/reflect/xptcall/src/md/Makefile.in
xpfe/components/autocomplete/Makefile.in
xulrunner/Makefile.in
xulrunner/examples/Makefile.in
xulrunner/examples/simple/components/Makefile.in
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -270,8 +270,61 @@ class ClangCommands(MachCommandBase):
 
 @CommandProvider
 class Package(MachCommandBase):
     """Package the built product for distribution."""
 
     @Command('package', help='Package the built product for distribution as an APK, DMG, etc.')
     def package(self):
         return self._run_make(directory=".", target='package', ensure_exit_code=False)
+
+
+@CommandProvider
+class Makefiles(MachCommandBase):
+    @Command('empty-makefiles', help='Find empty Makefile.in in the tree.')
+    def empty(self):
+        import pymake.parser
+        import pymake.parserdata
+
+        IGNORE_VARIABLES = {
+            'DEPTH': ('@DEPTH@',),
+            'topsrcdir': ('@top_srcdir@',),
+            'srcdir': ('@srcdir@',),
+            'relativesrcdir': ('@relativesrcdir@',),
+            'VPATH': ('@srcdir@',),
+        }
+
+        IGNORE_INCLUDES = [
+            'include $(DEPTH)/config/autoconf.mk',
+            'include $(topsrcdir)/config/config.mk',
+            'include $(topsrcdir)/config/rules.mk',
+        ]
+
+        def is_statement_relevant(s):
+            if isinstance(s, pymake.parserdata.SetVariable):
+                exp = s.vnameexp
+                if not exp.is_static_string:
+                    return True
+
+                if exp.s not in IGNORE_VARIABLES:
+                    return True
+
+                return s.value not in IGNORE_VARIABLES[exp.s]
+
+            if isinstance(s, pymake.parserdata.Include):
+                if s.to_source() in IGNORE_INCLUDES:
+                    return False
+
+            return True
+
+        for path in self._makefile_ins():
+            statements = [s for s in pymake.parser.parsefile(path)
+                if is_statement_relevant(s)]
+
+            if not statements:
+                print(os.path.relpath(path, self.topsrcdir))
+
+    def _makefile_ins(self):
+        for root, dirs, files in os.walk(self.topsrcdir):
+            for f in files:
+                if f == 'Makefile.in':
+                    yield os.path.join(root, f)
+
deleted file mode 100644
--- a/toolkit/toolkit-tiers.mk
+++ /dev/null
@@ -1,352 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-ifdef LIBXUL_SDK
-$(error toolkit-tiers.mk is not compatible with --enable-libxul-sdk=)
-endif
-
-TIERS += nspr
-
-ifndef MOZ_NATIVE_NSPR
-tier_nspr_staticdirs += nsprpub
-tier_nspr_dirs += config/nspr
-endif
-
-TIERS += nss
-
-ifndef MOZ_NATIVE_SQLITE
-tier_nss_dirs += db/sqlite3/src
-endif
-
-ifdef MOZ_PSM
-ifndef MOZ_NATIVE_NSS
-tier_nss_dirs += security/build
-endif
-endif
-
-include $(topsrcdir)/config/js/build.mk
-
-TIERS += platform
-
-ifdef NS_TRACE_MALLOC
-tier_platform_dirs = tools/trace-malloc/lib
-endif
-
-ifdef MOZ_DMD
-tier_platform_dirs += memory/replace/dmd
-endif
-
-ifdef MOZ_TREE_FREETYPE
-tier_platform_staticdirs += modules/freetype2
-endif
-
-tier_platform_dirs += xpcom
-
-tier_platform_dirs += \
-		modules/libpref \
-		intl \
-		netwerk \
-		$(NULL)
-
-ifdef MOZ_AUTH_EXTENSION
-tier_platform_dirs += extensions/auth
-endif
-
-#
-# "external" - 3rd party individual libraries
-#
-
-ifndef MOZ_NATIVE_JPEG
-tier_platform_dirs	+= media/libjpeg
-endif
-
-ifdef MOZ_UPDATER
-ifndef MOZ_NATIVE_BZ2
-tier_platform_dirs += modules/libbz2
-endif
-tier_platform_dirs += other-licenses/bsdiff
-endif
-
-tier_platform_dirs	+= gfx/qcms
-
-#
-# "gecko" - core components
-#
-
-tier_platform_dirs += ipc js/ipc
-
-tier_platform_dirs += \
-		hal \
-		js/xpconnect \
-		intl/chardet \
-		$(NULL)
-
-ifdef MOZ_ENABLE_GTK2
-ifdef MOZ_X11
-tier_platform_dirs     += widget/gtkxtbin
-endif
-endif
-
-tier_platform_dirs	+= \
-		modules/libjar \
-		storage \
-		$(NULL)
-
-ifdef MOZ_PERMISSIONS
-tier_platform_dirs += \
-		extensions/cookie \
-		extensions/permissions \
-		$(NULL)
-endif
-
-tier_platform_dirs += rdf
-
-ifdef MOZ_JSDEBUGGER
-tier_platform_dirs += js/jsd
-endif
-
-ifdef MOZ_VORBIS
-tier_platform_dirs += \
-		media/libvorbis \
-		$(NULL)
-endif
-
-ifdef MOZ_TREMOR
-tier_platform_dirs += \
-		media/libtremor \
-		$(NULL)
-endif
-
-ifdef MOZ_OPUS
-tier_platform_dirs += \
-  media/libopus \
-  $(NULL)
-endif
-
-ifdef MOZ_WEBM
-tier_platform_dirs += media/libnestegg
-endif
-
-ifdef MOZ_VP8
-ifndef MOZ_NATIVE_LIBVPX
-tier_platform_dirs += media/libvpx
-endif
-endif
-
-ifdef MOZ_OGG
-tier_platform_dirs += \
-		media/libogg \
-		media/libtheora \
-		$(NULL)
-endif
-
-ifdef MOZ_WEBVTT
-tier_platform_dirs += \
-		media/webvtt \
-		$(NULL)
-endif
-
-ifdef MOZ_SYDNEYAUDIO
-tier_platform_dirs += \
-		media/libsydneyaudio \
-		$(NULL)
-endif
-
-ifdef MOZ_WEBRTC
-tier_platform_dirs += \
-  media/webrtc \
-  media/mtransport/third_party \
-  media/mtransport/build \
-  media/mtransport/standalone \
-  $(NULL)
-endif
-
-ifdef MOZ_SPEEX_RESAMPLER
-tier_platform_dirs += \
-		media/libspeex_resampler \
-		$(NULL)
-endif
-
-ifdef MOZ_SOUNDTOUCH
-tier_platform_dirs += \
-		media/libsoundtouch \
-		$(NULL)
-endif
-
-ifdef MOZ_CUBEB
-tier_platform_dirs += \
-		media/libcubeb \
-		$(NULL)
-endif
-
-ifdef MOZ_OMX_PLUGIN
-tier_platform_dirs += \
-		media/omx-plugin/lib/ics/libutils \
-		media/omx-plugin/lib/ics/libstagefright \
-		media/omx-plugin/lib/gb/libutils \
-		media/omx-plugin/lib/gb/libstagefright \
-		media/omx-plugin/lib/gb/libstagefright_color_conversion \
-		media/omx-plugin/lib/gb235/libstagefright \
-		media/omx-plugin/lib/froyo/libstagefright \
-		media/omx-plugin \
-		media/omx-plugin/gb \
-		media/omx-plugin/gb235 \
-		media/omx-plugin/froyo \
-		media/omx-plugin/lib/hc/libstagefright \
-		media/omx-plugin/hc \
-		media/omx-plugin/sony \
-		$(NULL)
-endif
-
-ifndef MOZ_NATIVE_PNG
-tier_platform_dirs += media/libpng
-endif
-
-ifdef ENABLE_TESTS
-tier_platform_dirs += testing/specialpowers
-endif
-
-ifdef MOZ_ENABLE_GTEST
-tier_platform_dirs += testing/gtest
-endif
-
-tier_platform_dirs	+= \
-		uriloader \
-		caps \
-		parser \
-		gfx \
-		image \
-		dom \
-		view \
-		widget \
-		content \
-		editor \
-		layout \
-		docshell \
-		embedding \
-		xpfe/appshell \
-		$(NULL)
-
-# This needs to be built after the gfx/ directory
-# to ensure all dependencies for skia (e.g. mozalloc, xpcom)
-# have been built
-ifeq (android,$(MOZ_WIDGET_TOOLKIT))
-tier_platform_dirs += other-licenses/skia-npapi
-endif
-
-ifdef MOZ_UNIVERSALCHARDET
-tier_platform_dirs += extensions/universalchardet
-endif
-
-ifdef ACCESSIBILITY
-tier_platform_dirs    += accessible
-endif
-
-#
-# "toolkit" - xpfe & toolkit
-#
-
-tier_platform_dirs += profile
-
-# This must precede xpfe
-ifdef MOZ_JPROF
-tier_platform_dirs        += tools/jprof
-endif
-
-tier_platform_dirs  += tools/profiler
-
-tier_platform_dirs	+= xpfe/components
-
-ifdef MOZ_ENABLE_XREMOTE
-tier_platform_dirs += widget/xremoteclient
-endif
-
-ifdef MOZ_SPELLCHECK
-tier_platform_dirs	+= extensions/spellcheck
-endif
-
-ifdef MOZ_PSM
-tier_platform_dirs	+= security/manager
-else
-tier_platform_dirs	+= security/manager/boot/public security/manager/ssl/public
-endif
-
-ifdef MOZ_UPDATER
-tier_platform_dirs += modules/libmar
-endif
-
-tier_platform_dirs	+= toolkit
-
-ifdef MOZ_PREF_EXTENSIONS
-tier_platform_dirs += extensions/pref
-endif
-
-tier_platform_dirs += services
-
-tier_platform_dirs += startupcache
-
-tier_platform_dirs += js/ductwork/debugger
-
-tier_platform_dirs += other-licenses/snappy
-
-ifdef MOZ_GIO_COMPONENT
-tier_platform_dirs += extensions/gio
-endif
-
-ifdef APP_LIBXUL_STATICDIRS
-# Applications can cheat and ask for code to be
-# built before libxul so libxul can be linked against it.
-tier_platform_staticdirs += $(APP_LIBXUL_STATICDIRS)
-endif
-ifdef APP_LIBXUL_DIRS
-# Applications can cheat and ask for code to be
-# built before libxul so it can be linked into libxul.
-tier_platform_dirs += $(APP_LIBXUL_DIRS)
-endif
-
-tier_platform_dirs += toolkit/library
-
-tier_platform_dirs += xpcom/stub
-
-ifdef MOZ_REPLACE_MALLOC
-tier_platform_dirs += memory/replace
-endif
-
-ifdef NS_TRACE_MALLOC
-tier_platform_dirs += tools/trace-malloc
-endif
-
-ifdef MOZ_ENABLE_GNOME_COMPONENT
-tier_platform_dirs    += toolkit/system/gnome
-endif
-
-ifndef MOZ_ENABLE_LIBCONIC
-# if libconic is present, it will do its own network monitoring
-ifdef MOZ_ENABLE_DBUS
-tier_platform_dirs    += toolkit/system/dbus
-endif
-endif
-
-tier_platform_dirs += addon-sdk
-
-ifdef MOZ_MAPINFO
-tier_platform_dirs	+= tools/codesighs
-endif
-
-ifdef ENABLE_MARIONETTE
-tier_platform_dirs += testing/marionette
-endif
-
-ifdef ENABLE_TESTS
-tier_platform_dirs += testing/mochitest
-tier_platform_dirs += testing/xpcshell
-tier_platform_dirs += testing/tools/screenshot
-tier_platform_dirs += testing/peptest
-tier_platform_dirs += testing/mozbase
-tier_platform_dirs += testing/modules
-ifdef MOZ_WEBRTC
-tier_platform_dirs += media/webrtc/signaling/test
-tier_platform_dirs += media/mtransport/test
-endif
-endif