toolkit/modules/moz.build
author Felipe Gomes <felipc@gmail.com>
Fri, 22 Feb 2019 16:51:26 +0000
changeset 518488 f79d064a028c5f7898da39a72e5573ec7c1b2fd2
parent 518486 176ff7c8871e7df2977659d1f7c9107241bb6318
child 520710 6c2e00bcd2bb2a0534b3fc00b5f6a8c026785404
permissions -rw-r--r--
Bug 1351078 - Remove unused Battery.jsm. r=Yoric Differential Revision: https://phabricator.services.mozilla.com/D20756

# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.

include('../components/telemetry/telemetry-constants.mozbuild')

with Files('**'):
    BUG_COMPONENT = ('Toolkit', 'General')

with Files('addons/**'):
    BUG_COMPONENT = ('WebExtensions', 'General')

with Files('docs/**'):
    BUG_COMPONENT = ('Toolkit', 'Async Tooling')

with Files('subprocess/**'):
    BUG_COMPONENT = ('Toolkit', 'Async Tooling')

with Files('tests/browser/*AsyncPrefs*'):
    BUG_COMPONENT = ('Core', 'Security: Process Sandboxing')

with Files('tests/browser/*Finder*'):
    BUG_COMPONENT = ('Toolkit', 'Find Toolbar')

with Files('tests/xpcshell/test_Color.js'):
    BUG_COMPONENT = ('Toolkit', 'Find Toolbar')

with Files('tests/xpcshell/test_DeferredTask.js'):
    BUG_COMPONENT = ('Toolkit', 'Async Tooling')

with Files('tests/xpcshell/test_FinderIterator.js'):
    BUG_COMPONENT = ('Toolkit', 'Find Toolbar')

with Files('tests/xpcshell/test_Integration.js'):
    BUG_COMPONENT = ('Toolkit', 'Async Tooling')

with Files('tests/xpcshell/test_JSONFile.js'):
    BUG_COMPONENT = ('Toolkit', 'Form Manager')

with Files('tests/xpcshell/test_Match*.js'):
    BUG_COMPONENT = ('WebExtensions', 'General')

with Files('tests/xpcshell/test_NewTabUtils.js'):
    BUG_COMPONENT = ('Firefox', 'New Tab Page')

with Files('tests/xpcshell/test_UpdateUtils*.js'):
    BUG_COMPONENT = ('Toolkit', 'Application Update')

with Files('tests/xpcshell/test_client_id.js'):
    BUG_COMPONENT = ('Toolkit', 'Telemetry')

with Files('AsyncPrefs.jsm'):
    BUG_COMPONENT = ('Core', 'Security: Process Sandboxing')

with Files('AutoScrollController.jsm'):
    BUG_COMPONENT = ('Core', 'Panning and Zooming')

with Files('CharsetMenu.jsm'):
    BUG_COMPONENT = ('Firefox', 'Toolbars and Customization')

with Files('ClientID.jsm'):
    BUG_COMPONENT = ('Toolkit', 'Telemetry')

with Files('Color.jsm'):
    BUG_COMPONENT = ('Toolkit', 'Find Toolbar')

with Files('Console.jsm'):
    BUG_COMPONENT = ('DevTools', 'Console')

with Files('DateTimePicker*.jsm'):
    BUG_COMPONENT = ('Core', 'Layout: Form Controls ')

with Files('DeferredTask.jsm'):
    BUG_COMPONENT = ('Toolkit', 'Async Tooling')

with Files("E10SUtils.jsm"):
    BUG_COMPONENT = ("Core", "Security: Process Sandboxing")

with Files('Finder*.jsm'):
    BUG_COMPONENT = ('Toolkit', 'Find Toolbar')

with Files('FormLikeFactory.jsm'):
    BUG_COMPONENT = ('Toolkit', 'Password Manager')

with Files('IndexedDB.jsm'):
    BUG_COMPONENT = ('WebExtensions', 'General')

with Files('InlineSpellChecker*.jsm'):
    BUG_COMPONENT = ('Core', 'Spell Checker')

with Files('Integration.jsm'):
    BUG_COMPONENT = ('Toolkit', 'Async Tooling')

with Files('JSONFile.jsm'):
    BUG_COMPONENT = ('Toolkit', 'Form Manager')

with Files('LightweightThemeConsumer.jsm'):
    BUG_COMPONENT = ('Firefox', 'Toolbars and Customization')

with Files('NLP.jsm'):
    BUG_COMPONENT = ('Toolkit', 'Find Toolbar')

with Files('NewTabUtils.jsm'):
    BUG_COMPONENT = ('Firefox', 'Tabbed Browser')

with Files('ObjectUtils.jsm'):
    BUG_COMPONENT = ('Toolkit', 'Telemetry')

with Files("offlineAppCache.jsm"):
    BUG_COMPONENT = ("Toolkit", "Preferences")

with Files('PageMenu.jsm'):
    BUG_COMPONENT = ('Firefox', 'Menus')

with Files('PermissionsUtils.jsm'):
    BUG_COMPONENT = ('Toolkit', 'Add-ons Manager')

with Files('PopupNotifications.jsm'):
    BUG_COMPONENT = ('Toolkit', 'Password Manager')

with Files('PrivateBrowsingUtils.jsm'):
    BUG_COMPONENT = ('Firefox', 'Private Browsing')

with Files('Promise*.jsm'):
    BUG_COMPONENT = ('Toolkit', 'Async Tooling')

with Files('RemoteController.js'):
    BUG_COMPONENT = ('Core', 'Widget')

with Files('RemoteSecurityUI.jsm'):
    BUG_COMPONENT = ('Firefox', 'Tabbed Browser')

with Files('RemoteWebProgress.jsm'):
    BUG_COMPONENT = ('Core', 'Document Navigation')

with Files('ResponsivenessMonitor.jsm'):
    BUG_COMPONENT = ('Firefox', 'Migration')

with Files('ShortcutUtils.jsm'):
    BUG_COMPONENT = ('Firefox', 'Toolbars and Customization')

with Files('Sqlite.jsm'):
    BUG_COMPONENT = ('Toolkit', 'Storage')

with Files('UpdateUtils.jsm'):
    BUG_COMPONENT = ('Toolkit', 'Application Update')

with Files('WindowsRegistry.jsm'):
    BUG_COMPONENT = ('Toolkit', 'General')


XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell/xpcshell.ini']
BROWSER_CHROME_MANIFESTS += ['tests/browser/browser.ini']
MOCHITEST_CHROME_MANIFESTS += ['tests/chrome/chrome.ini']

TESTING_JS_MODULES += [
    'HiddenFrame.jsm',
    'tests/modules/MockDocument.jsm',
    'tests/modules/PromiseTestUtils.jsm',
    'tests/modules/Task.jsm',
    'tests/xpcshell/TestIntegration.jsm',
]

SPHINX_TREES['toolkit_modules'] = 'docs'

with Files('docs/**'):
    SCHEDULES.exclusive = ['docs']

EXTRA_JS_MODULES += [
    'AboutPagesUtils.jsm',
    'ActorChild.jsm',
    'ActorManagerChild.jsm',
    'ActorManagerParent.jsm',
    'addons/MatchURLFilters.jsm',
    'addons/SecurityInfo.jsm',
    'addons/WebNavigation.jsm',
    'addons/WebNavigationContent.js',
    'addons/WebNavigationFrames.jsm',
    'addons/WebRequest.jsm',
    'addons/WebRequestCommon.jsm',
    'addons/WebRequestContent.js',
    'addons/WebRequestUpload.jsm',
    'AppMenuNotifications.jsm',
    'AsyncPrefs.jsm',
    'AutoCompletePopupContent.jsm',
    'AutoScrollController.jsm',
    'BinarySearch.jsm',
    'BrowserUtils.jsm',
    'CanonicalJSON.jsm',
    'CertUtils.jsm',
    'CharsetMenu.jsm',
    'ClientID.jsm',
    'Color.jsm',
    'Console.jsm',
    'CreditCard.jsm',
    'css-selector.js',
    'DateTimePickerPanel.jsm',
    'DateTimePickerParent.jsm',
    'DeferredTask.jsm',
    'Deprecated.jsm',
    'E10SUtils.jsm',
    'EventEmitter.jsm',
    'FileUtils.jsm',
    'FindBarContent.jsm',
    'Finder.jsm',
    'FinderHighlighter.jsm',
    'FinderIterator.jsm',
    'FinderParent.jsm',
    'FormLikeFactory.jsm',
    'Geometry.jsm',
    'GMPExtractorWorker.js',
    'GMPInstallManager.jsm',
    'GMPUtils.jsm',
    'Http.jsm',
    'IndexedDB.jsm',
    'InlineSpellChecker.jsm',
    'InlineSpellCheckerContent.jsm',
    'Integration.jsm',
    'JSONFile.jsm',
    'Log.jsm',
    'NewTabUtils.jsm',
    'NLP.jsm',
    'ObjectUtils.jsm',
    'offlineAppCache.jsm',
    'PageMenu.jsm',
    'PermissionsUtils.jsm',
    'PopupNotifications.jsm',
    'Preferences.jsm',
    'PrivateBrowsingUtils.jsm',
    'ProfileAge.jsm',
    'Promise-backend.js',
    'Promise.jsm',
    'PromiseMessage.jsm',
    'PromiseUtils.jsm',
    'RemoteController.js',
    'RemoteSecurityUI.jsm',
    'RemoteWebProgress.jsm',
    'ResetProfile.jsm',
    'ResponsivenessMonitor.jsm',
    'SelectParentHelper.jsm',
    'ServiceRequest.jsm',
    'Services.jsm',
    'ShortcutUtils.jsm',
    'Sqlite.jsm',
    'Timer.jsm',
    'Troubleshoot.jsm',
    'UpdateUtils.jsm',
    'WebChannel.jsm',
    'WebProgressChild.jsm',
    'ZipUtils.jsm',
]

if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
    EXTRA_JS_MODULES += [
        'PropertyListUtils.jsm',
    ]

EXTRA_JS_MODULES.third_party.jsesc += ['third_party/jsesc/jsesc.js']
EXTRA_JS_MODULES.sessionstore += [
    'sessionstore/PrivacyFilter.jsm',
    'sessionstore/PrivacyLevel.jsm',
    'sessionstore/SessionHistory.jsm',
    'sessionstore/Utils.jsm',
]

if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk3'):
    DEFINES['MENUBAR_CAN_AUTOHIDE'] = 1

if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk3', 'cocoa'):
    DEFINES['HAVE_SHELL_SERVICE'] = 1

EXTRA_PP_JS_MODULES += [
    'AppConstants.jsm',
]

if 'Android' != CONFIG['OS_TARGET']:
    EXTRA_JS_MODULES += [
        'LightweightThemeConsumer.jsm',
    ]

    DIRS += [
        'subprocess',
    ]
else:
    DEFINES['ANDROID'] = True
    EXTRA_JS_MODULES += [
        'secondscreen/RokuApp.jsm',
        'secondscreen/SimpleServiceDiscovery.jsm',
    ]


if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
    EXTRA_JS_MODULES += [
        'WindowsRegistry.jsm',
    ]

for var in ('ANDROID_PACKAGE_NAME',
            'MOZ_APP_NAME',
            'MOZ_APP_VERSION',
            'MOZ_APP_VERSION_DISPLAY',
            'MOZ_BING_API_CLIENTID',
            'MOZ_BING_API_KEY',
            'MOZ_GOOGLE_API_KEY',
            'MOZ_MACBUNDLE_NAME',
            'MOZ_MOZILLA_API_KEY',
            'MOZ_WIDGET_TOOLKIT',
            'DLL_PREFIX',
            'DLL_SUFFIX',
            'DEBUG_JS_MODULES'):
            DEFINES[var] = CONFIG[var]

for var in ('MOZ_TOOLKIT_SEARCH',
            'MOZ_SYSTEM_NSS',
            'MOZ_UNSIGNED_APP_SCOPE',
            'MOZ_UNSIGNED_SYSTEM_SCOPE',
            'MOZ_UPDATER',
            'MOZ_ANDROID_MOZILLA_ONLINE',
            'MOZ_SWITCHBOARD'):
    if CONFIG[var]:
        DEFINES[var] = True

JAR_MANIFESTS += ['jar.mn']

DEFINES['TOPOBJDIR'] = TOPOBJDIR