dom/base/moz.build
author Oleg Romashin <romaxa@gmail.com>
Sat, 22 Nov 2014 12:15:00 +0100
changeset 219062 cadfee0aa2af0fa0c5d3e192423024d417b3183a
parent 215127 4111cfcf8636385a43f2f6032fa9332c8131fdde
child 219203 c395ddeb9e91b4a5baf12ffbce50d7d3d7725ec6
permissions -rw-r--r--
Bug 1103412 - Gecko does not compile with printing disabled. r=mconley

# -*- 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/.

TEST_DIRS += ['test']

XPIDL_SOURCES += [
    'nsIConsoleAPIStorage.idl',
    'nsIContentPolicy.idl',
    'nsIDocumentEncoder.idl',
    'nsIDOMDataChannel.idl',
    'nsIDOMDOMCursor.idl',
    'nsIDOMDOMRequest.idl',
    'nsIDOMFile.idl',
    'nsIDOMFileList.idl',
    'nsIDOMFileReader.idl',
    'nsIDOMFormData.idl',
    'nsIDOMParser.idl',
    'nsIDOMSerializer.idl',
    'nsIDroppedLinkHandler.idl',
    'nsIEntropyCollector.idl',
    'nsIFrameLoader.idl',
    'nsIImageLoadingContent.idl',
    'nsIMessageManager.idl',
    'nsIObjectLoadingContent.idl',
    'nsIScriptChannel.idl',
    'nsIScriptLoaderObserver.idl',
    'nsISelection.idl',
    'nsISelectionController.idl',
    'nsISelectionDisplay.idl',
    'nsISelectionListener.idl',
    'nsISelectionPrivate.idl',
    'nsISiteSpecificUserAgent.idl',
    'nsISlowScriptDebug.idl',
    'nsIXMLHttpRequest.idl',
]

XPIDL_MODULE = 'dom'

EXPORTS += [
    'AutocompleteFieldList.h',
    'Crypto.h',
    'HTMLSplitOnSpacesTokenizer.h',
    'mozAutoDocUpdate.h',
    'mozFlushType.h',
    'nsAtomListUtils.h',
    'nsAttrAndChildArray.h',
    'nsAttrName.h',
    'nsAttrValue.h',
    'nsAttrValueInlines.h',
    'nsCaseTreatment.h',
    'nsContentCID.h',
    'nsContentCreatorFunctions.h',
    'nsContentList.h',
    'nsContentListDeclarations.h',
    'nsContentPermissionHelper.h',
    'nsContentPolicyUtils.h',
    'nsContentSink.h',
    'nsContentTypeParser.h',
    'nsContentUtils.h',
    'nsCopySupport.h',
    'nsCrossSiteListenerProxy.h',
    'nsDeprecatedOperationList.h',
    'nsDocElementCreatedNotificationRunner.h',
    'nsDOMAttributeMap.h',
    'nsDOMCID.h',
    'nsDOMClassInfoClasses.h',
    'nsDOMClassInfoID.h',
    'nsDOMJSUtils.h',
    'nsDOMNavigationTiming.h',
    'nsDOMString.h',
    'nsElementFrameLoaderOwner.h',
    'nsFocusManager.h',
    'nsFrameMessageManager.h',
    'nsGenericDOMDataNode.h',
    'nsGkAtomList.h',
    'nsGkAtoms.h',
    'nsHostObjectProtocolHandler.h',
    'nsIAttribute.h',
    'nsIContent.h',
    'nsIContentInlines.h',
    'nsIContentIterator.h',
    'nsIContentSerializer.h',
    'nsIDocument.h',
    'nsIDocumentInlines.h',
    'nsIDocumentObserver.h',
    'nsIDOMClassInfo.h',
    'nsIDOMScriptObjectFactory.h',
    'nsIGlobalObject.h',
    'nsImageLoadingContent.h',
    'nsIMutationObserver.h',
    'nsINode.h',
    'nsINodeList.h',
    'nsIScriptContext.h',
    'nsIScriptElement.h',
    'nsIScriptGlobalObject.h',
    'nsIScriptNameSpaceManager.h',
    'nsIScriptObjectPrincipal.h',
    'nsIScriptTimeoutHandler.h',
    'nsIStyleSheetLinkingElement.h',
    'nsJSEnvironment.h',
    'nsJSUtils.h',
    'nsLineBreaker.h',
    'nsMappedAttributeElement.h',
    'nsNameSpaceManager.h',
    'nsNodeInfoManager.h',
    'nsNodeUtils.h',
    'nsPerformance.h',
    'nsPIDOMWindow.h',
    'nsPIWindowRoot.h',
    'nsPropertyTable.h',
    'nsRange.h',
    'nsReferencedElement.h',
    'nsSandboxFlags.h',
    'nsScriptLoader.h',
    'nsStructuredCloneContainer.h',
    'nsStubDocumentObserver.h',
    'nsStubMutationObserver.h',
    'nsStyledElement.h',
    'nsTextFragment.h',
    'nsTraversal.h',
    'nsTreeSanitizer.h',
    'nsViewportInfo.h',
    'nsWindowMemoryReporter.h',
    'nsWrapperCache.h',
    'nsWrapperCacheInlines.h',
    'nsXMLNameSpaceMap.h',
]

if CONFIG['MOZ_WEBRTC']:
    EXPORTS += [
        'nsDOMDataChannel.h',
        'nsDOMDataChannelDeclarations.h',
    ]

EXPORTS.mozilla += [
    'CORSMode.h',
    'FeedWriterEnabled.h',
]

EXPORTS.mozilla.dom += [
    'AnonymousContent.h',
    'Attr.h',
    'BarProps.h',
    'BlobSet.h',
    'ChildIterator.h',
    'Comment.h',
    'Console.h',
    'DirectionalityUtils.h',
    'DocumentFragment.h',
    'DocumentType.h',
    'DOMCursor.h',
    'DOMError.h',
    'DOMException.h',
    'DOMImplementation.h',
    'DOMMatrix.h',
    'DOMParser.h',
    'DOMPoint.h',
    'DOMQuad.h',
    'DOMRect.h',
    'DOMRequest.h',
    'DOMStringList.h',
    'Element.h',
    'ElementInlines.h',
    'EventSource.h',
    'File.h',
    'FragmentOrElement.h',
    'FromParser.h',
    'ImageEncoder.h',
    'ImportManager.h',
    'Link.h',
    'MessageChannel.h',
    'MessagePort.h',
    'MessagePortList.h',
    'NameSpaceConstants.h',
    'Navigator.h',
    'NodeInfo.h',
    'NodeInfoInlines.h',
    'NodeIterator.h',
    'PerformanceEntry.h',
    'PerformanceResourceTiming.h',
    'ResponsiveImageSelector.h',
    'ScreenOrientation.h',
    'ScriptSettings.h',
    'ShadowRoot.h',
    'StructuredCloneTags.h',
    'StyleSheetList.h',
    'SubtleCrypto.h',
    'Text.h',
    'TreeWalker.h',
    'URL.h',
    'URLSearchParams.h',
    'WebSocket.h',
]

UNIFIED_SOURCES += [
    'AnonymousContent.cpp',
    'Attr.cpp',
    'BarProps.cpp',
    'ChildIterator.cpp',
    'Comment.cpp',
    'CompositionStringSynthesizer.cpp',
    'Console.cpp',
    'Crypto.cpp',
    'DirectionalityUtils.cpp',
    'DocumentFragment.cpp',
    'DocumentType.cpp',
    'DOMCursor.cpp',
    'DOMError.cpp',
    'DOMException.cpp',
    'DOMImplementation.cpp',
    'DOMMatrix.cpp',
    'DOMParser.cpp',
    'DOMPoint.cpp',
    'DOMQuad.cpp',
    'DOMRect.cpp',
    'DOMRequest.cpp',
    'DOMStringList.cpp',
    'Element.cpp',
    'EventSource.cpp',
    'File.cpp',
    'FileIOObject.cpp',
    'FragmentOrElement.cpp',
    'ImageEncoder.cpp',
    'ImportManager.cpp',
    'Link.cpp',
    'MessageChannel.cpp',
    'MessagePortList.cpp',
    'MultipartFileImpl.cpp',
    'Navigator.cpp',
    'NodeInfo.cpp',
    'NodeIterator.cpp',
    'nsAtomListUtils.cpp',
    'nsAttrAndChildArray.cpp',
    'nsAttrValue.cpp',
    'nsAttrValueOrString.cpp',
    'nsCCUncollectableMarker.cpp',
    'nsContentAreaDragDrop.cpp',
    'nsContentIterator.cpp',
    'nsContentList.cpp',
    'nsContentPermissionHelper.cpp',
    'nsContentPolicy.cpp',
    'nsContentSink.cpp',
    'nsCopySupport.cpp',
    'nsCrossSiteListenerProxy.cpp',
    'nsDataDocumentContentPolicy.cpp',
    'nsDocument.cpp',
    'nsDocumentEncoder.cpp',
    'nsDOMAttributeMap.cpp',
    'nsDOMCaretPosition.cpp',
    'nsDOMClassInfo.cpp',
    'nsDOMFileReader.cpp',
    'nsDOMMutationObserver.cpp',
    'nsDOMNavigationTiming.cpp',
    'nsDOMScriptObjectFactory.cpp',
    'nsDOMSerializer.cpp',
    'nsDOMSettableTokenList.cpp',
    'nsDOMTokenList.cpp',
    'nsDOMWindowList.cpp',
    'nsElementFrameLoaderOwner.cpp',
    'nsFocusManager.cpp',
    'nsFormData.cpp',
    'nsFrameLoader.cpp',
    'nsFrameMessageManager.cpp',
    'nsGenConImageContent.cpp',
    'nsGenericDOMDataNode.cpp',
    'nsGkAtoms.cpp',
    'nsGlobalWindowCommands.cpp',
    'nsHistory.cpp',
    'nsHostObjectProtocolHandler.cpp',
    'nsHostObjectURI.cpp',
    'nsHTMLContentSerializer.cpp',
    'nsIGlobalObject.cpp',
    'nsINode.cpp',
    'nsInProcessTabChildGlobal.cpp',
    'nsJSEnvironment.cpp',
    'nsJSTimeoutHandler.cpp',
    'nsJSUtils.cpp',
    'nsLineBreaker.cpp',
    'nsLocation.cpp',
    'nsMappedAttributeElement.cpp',
    'nsMappedAttributes.cpp',
    'nsMimeTypeArray.cpp',
    'nsNameSpaceManager.cpp',
    'nsNoDataProtocolContentPolicy.cpp',
    'nsNodeInfoManager.cpp',
    'nsNodeUtils.cpp',
    'nsOpenURIInFrameParams.cpp',
    'nsPerformance.cpp',
    'nsPlainTextSerializer.cpp',
    'nsPropertyTable.cpp',
    'nsQueryContentEventResult.cpp',
    'nsRange.cpp',
    'nsReferencedElement.cpp',
    'nsScreen.cpp',
    'nsScriptElement.cpp',
    'nsScriptLoader.cpp',
    'nsScriptNameSpaceManager.cpp',
    'nsStructuredCloneContainer.cpp',
    'nsStubDocumentObserver.cpp',
    'nsStubMutationObserver.cpp',
    'nsStyledElement.cpp',
    'nsStyleLinkElement.cpp',
    'nsSyncLoadService.cpp',
    'nsTextFragment.cpp',
    'nsTextNode.cpp',
    'nsTraversal.cpp',
    'nsTreeSanitizer.cpp',
    'nsViewportInfo.cpp',
    'nsWindowMemoryReporter.cpp',
    'nsWindowRoot.cpp',
    'nsWrapperCache.cpp',
    'nsXHTMLContentSerializer.cpp',
    'nsXMLContentSerializer.cpp',
    'nsXMLHttpRequest.cpp',
    'nsXMLNameSpaceMap.cpp',
    'PerformanceEntry.cpp',
    'PerformanceResourceTiming.cpp',
    'ResponsiveImageSelector.cpp',
    'ScriptSettings.cpp',
    'ShadowRoot.cpp',
    'StyleSheetList.cpp',
    'SubtleCrypto.cpp',
    'Text.cpp',
    'ThirdPartyUtil.cpp',
    'TreeWalker.cpp',
    'URL.cpp',
    'URLSearchParams.cpp',
    'WebSocket.cpp',
    'WindowNamedPropertiesHandler.cpp',
]

if CONFIG['MOZ_WEBRTC']:
    UNIFIED_SOURCES += [
        'nsDOMDataChannel.cpp',
    ]

# these files couldn't be in UNIFIED_SOURCES for now for reasons given below:
SOURCES += [
    # this file doesn't like windows.h
    'MessagePort.cpp',
    # Because of OS X headers.
    'nsContentUtils.cpp',
    # this file doesn't like windows.h
    'nsDOMWindowUtils.cpp',
    # This file has a #error "Never include windows.h in this file!"
    'nsGlobalWindow.cpp',
    # Conflicts with windows.h's definition of LoadImage.
    'nsImageLoadingContent.cpp',
    # Because of OS X headers.
    'nsObjectLoadingContent.cpp',
    # nsPluginArray.cpp includes npapi.h indirectly, and that includes a lot of system headers
    'nsPluginArray.cpp',
]

# Are we targeting x86-32 or x86-64?  If so, we want to include SSE2 code for
# nsTextFragment.cpp
if CONFIG['INTEL_ARCHITECTURE']:
    SOURCES += ['nsTextFragmentSSE2.cpp']
    SOURCES['nsTextFragmentSSE2.cpp'].flags += CONFIG['SSE2_FLAGS']

EXTRA_COMPONENTS += [
    'ConsoleAPI.manifest',
    'ConsoleAPIStorage.js',
    'contentAreaDropListener.js',
    'contentAreaDropListener.manifest',
    'messageWakeupService.js',
    'messageWakeupService.manifest',
    'SiteSpecificUserAgent.js',
    'SiteSpecificUserAgent.manifest',
    'SlowScriptDebug.js',
    'SlowScriptDebug.manifest',
]

EXTRA_JS_MODULES += [
    'DOMRequestHelper.jsm',
    'IndexedDBHelper.jsm',
]

FAIL_ON_WARNINGS = True

MSVC_ENABLE_PGO = True

LOCAL_INCLUDES += [
    '../battery',
    '../bluetooth',
    '../events',
    '../media',
    '../network',
    '../time',
    '/caps',
    '/docshell/base',
    '/dom/base',
    '/dom/geolocation',
    '/dom/html',
    '/dom/ipc',
    '/dom/storage',
    '/dom/svg',
    '/dom/workers',
    '/dom/xbl',
    '/dom/xml',
    '/dom/xslt/xpath',
    '/dom/xul',
    '/image/src',
    '/js/ipc',
    '/js/xpconnect/src',
    '/js/xpconnect/wrappers',
    '/layout/base',
    '/layout/generic',
    '/layout/style',
    '/layout/svg',
    '/layout/xul',
    '/netwerk/base/src',
    '/widget',
    '/xpcom/ds',
]

if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
    LOCAL_INCLUDES += [
        '../fmradio',
        '../system/gonk',
    ]

if CONFIG['MOZ_WEBRTC']:
    LOCAL_INCLUDES += [
        '/netwerk/sctp/datachannel',
    ]

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

FINAL_LIBRARY = 'xul'

for var in ('MOZ_B2G_RIL', 'MOZ_B2G_FM'):
    if CONFIG[var]:
        DEFINES[var] = True

if CONFIG['MOZ_BUILD_APP'] in ['browser', 'mobile/android', 'xulrunner']:
    DEFINES['HAVE_SIDEBAR'] = True

if CONFIG['MOZ_X11']:
    CXXFLAGS += CONFIG['TK_CFLAGS']