widget/moz.build
author Mike Hommey <mh+mozilla@glandium.org>
Tue, 04 Nov 2014 13:50:18 +0900
changeset 240257 6cd60e5f3d5272fc6c01a0c7b9388ae4f107a517
parent 239203 a9530d7f005aa70510c19c11c1eaaaf8a27af0fe
child 241781 dcc233b91a99e7d8cfaa39b508d2eb2c2496fab6
permissions -rw-r--r--
Bug 1091505 - Run subconfigures in parallel. r=gps On automation, this brings Windows configure time on a clobber from 5:30 to 3:10. Sadly, because make needs to run under intl/icu/host before configuring intl/icu/target, intl/icu/host needs to be configured independently. Fortunately, that's not configured for normal windows builds anyways. Also, having multiple subconfigures sharing the same cache file is dangerously racy. Fortunately, not a lot do. In fact, only js/src and $_subconfigure_subdir do, so force the latter (only used for ldap sdk on comm-central) not to configure in parallel.

# -*- Mode: python; c-basic-offset: 4; 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/.

toolkit = CONFIG['MOZ_WIDGET_TOOLKIT']

if toolkit in ('cocoa', 'qt', 'android', 'gonk'):
    DIRS += [toolkit]
if toolkit in ('qt', 'android', 'gonk', 'gtk2', 'gtk3'):
    EXPORTS += ['nsIPrintDialogService.h']

if toolkit == 'windows':
    DIRS += ['windows']

    XPIDL_SOURCES += [
        'nsIJumpListBuilder.idl',
        'nsIJumpListItem.idl',
        'nsIPrintSettingsWin.idl',
        'nsITaskbarOverlayIconController.idl',
        'nsITaskbarPreview.idl',
        'nsITaskbarPreviewButton.idl',
        'nsITaskbarPreviewController.idl',
        'nsITaskbarProgress.idl',
        'nsITaskbarTabPreview.idl',
        'nsITaskbarWindowPreview.idl',
        'nsIWinTaskbar.idl',
    ]
elif toolkit == 'cocoa':
    XPIDL_SOURCES += [
        'nsIMacDockSupport.idl',
        'nsIMacWebAppUtils.idl',
        'nsIStandaloneNativeMenu.idl',
        'nsISystemStatusBar.idl',
        'nsITaskbarProgress.idl',
    ]
    EXPORTS += [
        'nsINativeMenuService.h',
        'nsIPrintDialogService.h',
    ]

TEST_DIRS += ['tests']

# Don't build the DSO under the 'build' directory as windows does.
#
# The DSOs get built in the toolkit dir itself.  Do this so that
# multiple implementations of widget can be built on the same
# source tree.
#
if CONFIG['MOZ_ENABLE_GTK']:
    DIRS += ['gtk']

    if CONFIG['MOZ_X11']:
        DIRS += ['gtkxtbin']

XPIDL_SOURCES += [
    'nsIAppShell.idl',
    'nsIBaseWindow.idl',
    'nsIBidiKeyboard.idl',
    'nsIClipboard.idl',
    'nsIClipboardDragDropHookList.idl',
    'nsIClipboardDragDropHooks.idl',
    'nsIClipboardHelper.idl',
    'nsIClipboardOwner.idl',
    'nsIColorPicker.idl',
    'nsIDragService.idl',
    'nsIDragSession.idl',
    'nsIFilePicker.idl',
    'nsIFormatConverter.idl',
    'nsIGfxInfo.idl',
    'nsIGfxInfoDebug.idl',
    'nsIIdleService.idl',
    'nsIIdleServiceInternal.idl',
    'nsIIMEPicker.idl',
    'nsIPrintOptions.idl',
    'nsIPrintSession.idl',
    'nsIPrintSettings.idl',
    'nsIPrintSettingsService.idl',
    'nsIScreen.idl',
    'nsIScreenManager.idl',
    'nsISound.idl',
    'nsITransferable.idl',
]

if CONFIG['MOZ_METRO']:
    XPIDL_SOURCES += [
        'MetroUIUtils.idl',
        'nsIWinMetroUtils.idl',
    ]

XPIDL_MODULE = 'widget'

EXPORTS += [
    'ContentHelper.h',
    'GfxDriverInfo.h',
    'GfxInfoBase.h',
    'GfxInfoCollector.h',
    'InputData.h',
    'nsIDeviceContextSpec.h',
    'nsIPluginWidget.h',
    'nsIRollupListener.h',
    'nsIWidget.h',
    'nsIWidgetListener.h',
    'nsPrintOptionsImpl.h',
    'nsWidgetInitData.h',
    'nsWidgetsCID.h',
]

EXPORTS.mozilla += [
    'BasicEvents.h',
    'CommandList.h',
    'ContentEvents.h',
    'EventClassList.h',
    'EventForwards.h',
    'LookAndFeel.h',
    'MiscEvents.h',
    'MouseEvents.h',
    'TextEvents.h',
    'TextRange.h',
    'TouchEvents.h',
    'VsyncDispatcher.h',
    'WidgetUtils.h',
]

UNIFIED_SOURCES += [
    'ContentHelper.cpp',
    'GfxDriverInfo.cpp',
    'GfxInfoBase.cpp',
    'GfxInfoCollector.cpp',
    'GfxInfoWebGL.cpp',
    'InputData.cpp',
    'nsBaseAppShell.cpp',
    'nsBaseDragService.cpp',
    'nsBaseScreen.cpp',
    'nsClipboardHelper.cpp',
    'nsClipboardProxy.cpp',
    'nsColorPickerProxy.cpp',
    'nsContentProcessWidgetFactory.cpp',
    'nsFilePickerProxy.cpp',
    'nsHTMLFormatConverter.cpp',
    'nsIdleService.cpp',
    'nsIWidgetListener.cpp',
    'nsPrimitiveHelpers.cpp',
    'nsPrintOptionsImpl.cpp',
    'nsPrintSession.cpp',
    'nsPrintSettingsImpl.cpp',
    'nsScreenManagerProxy.cpp',
    'nsShmImage.cpp',
    'nsTransferable.cpp',
    'nsXPLookAndFeel.cpp',
    'PuppetWidget.cpp',
    'ScreenProxy.cpp',
    'SharedWidgetUtils.cpp',
    'VsyncDispatcher.cpp',
    'WidgetEventImpl.cpp',
    'WidgetUtils.cpp',
]

# nsBaseWidget.cpp needs to be built separately because of name clashes in the OS X headers
SOURCES += [
    'nsBaseWidget.cpp',
]

if CONFIG['MOZ_INSTRUMENT_EVENT_LOOP']:
    EXPORTS.mozilla += [
        'WidgetTraceEvent.h',
    ]

EXPORTS.ipc = ['nsGUIEventIPC.h']

if CONFIG['MOZ_X11']:
    DIRS += ['x11']
    UNIFIED_SOURCES += [
        'GfxInfoX11.cpp'
    ]

if toolkit in ('cocoa', 'windows'):
    UNIFIED_SOURCES += [
        'nsBaseClipboard.cpp',
    ]

if toolkit in ('qt', 'gtk2', 'gtk3', 'cocoa', 'windows',
                                    'android', 'gonk'):
    UNIFIED_SOURCES += [
        'nsBaseFilePicker.cpp',
    ]

if toolkit in ('qt', 'gtk2', 'gtk3', 'windows', 'cocoa'):
    UNIFIED_SOURCES += [
        'nsNativeTheme.cpp',
    ]

if not CONFIG['MOZ_B2G']:
    DEFINES['MOZ_CROSS_PROCESS_IME'] = True

FAIL_ON_WARNINGS = True

MSVC_ENABLE_PGO = True

include('/ipc/chromium/chromium-config.mozbuild')

LOCAL_INCLUDES += [
    '/layout/base',
    '/layout/forms',
    '/layout/generic',
    '/layout/xul',
    '/view',
    '/widget',
]

widget_dir = toolkit
if widget_dir in ('gtk3', 'gtk2'):
    # gtk3 shares includes with gtk2
    widget_dir = 'gtk'

LOCAL_INCLUDES += [
    '/widget/%s' % widget_dir,
]
FINAL_LIBRARY = 'xul'

if CONFIG['MOZ_ENABLE_D3D10_LAYER']:
    DEFINES['MOZ_ENABLE_D3D10_LAYER'] = True

CXXFLAGS += CONFIG['TK_CFLAGS']