diff options
Diffstat (limited to 'Source/WebCore/gyp')
-rw-r--r-- | Source/WebCore/gyp/WebCore.gyp | 266 | ||||
-rwxr-xr-x | Source/WebCore/gyp/copy-forwarding-and-icu-headers.sh | 4 | ||||
-rwxr-xr-x | Source/WebCore/gyp/copy-inspector-resources.sh | 14 | ||||
-rwxr-xr-x | Source/WebCore/gyp/generate-webcore-export-file-generator.sh | 5 | ||||
-rwxr-xr-x | Source/WebCore/gyp/run-if-exists.sh | 5 | ||||
-rwxr-xr-x | Source/WebCore/gyp/streamline-inspector-source.sh | 19 | ||||
-rwxr-xr-x | Source/WebCore/gyp/update-info-plist.sh | 4 |
7 files changed, 238 insertions, 79 deletions
diff --git a/Source/WebCore/gyp/WebCore.gyp b/Source/WebCore/gyp/WebCore.gyp index b811b52..ce78b67 100644 --- a/Source/WebCore/gyp/WebCore.gyp +++ b/Source/WebCore/gyp/WebCore.gyp @@ -3,7 +3,26 @@ '../../gyp/common.gypi', '../WebCore.gypi', ], - 'xcode_config_file': '../Configurations/DebugRelease.xcconfig', + 'configurations': { + 'Production': { + 'xcode_config_file': '<(project_dir)/Configurations/Base.xcconfig', + }, + 'Release': { + 'xcode_config_file': '<(project_dir)/Configurations/DebugRelease.xcconfig', + 'xcode_settings': { + 'STRIP_INSTALLED_PRODUCT': 'NO', + }, + }, + 'Debug': { + 'xcode_config_file': '<(project_dir)/Configurations/DebugRelease.xcconfig', + 'xcode_settings': { + 'DEAD_CODE_STRIPPING': '$(DEAD_CODE_STRIPPING_debug)', + 'DEBUG_DEFINES': '$(DEBUG_DEFINES_debug)', + 'GCC_OPTIMIZATION_LEVEL': '$(GCC_OPTIMIZATION_LEVEL_debug)', + 'STRIP_INSTALLED_PRODUCT': '$(STRIP_INSTALLED_PRODUCT_debug)', + }, + }, + }, 'targets': [ { 'target_name': 'WebCore', @@ -16,14 +35,16 @@ # FIXME: Add 'Copy Inspector Resources', ], 'include_dirs': [ - '<(DEPTH)/WebCore/icu', - '<(DEPTH)/WebCore/ForwardingHeaders', + '<(project_dir)', + '<(project_dir)/icu', + '<(project_dir)/ForwardingHeaders', '<(PRODUCT_DIR)/usr/local/include', '/usr/include/libxml2', + '<(PRODUCT_DIR)/DerivedSources', + '<(PRODUCT_DIR)/DerivedSources/WebCore', ], 'sources': [ '<@(webcore_files)', - '<@(webcore_publicheader_files)', '<@(webcore_privateheader_files)', '<@(webcore_derived_source_files)', '$(SDKROOT)/System/Library/Frameworks/Accelerate.framework', @@ -44,105 +65,121 @@ 'libz.dylib', ], 'sources/': [ - ['exclude', 'accessibility/[^/]+/'], - ['include', 'accessibility/mac/'], ['exclude', 'bindings/[^/]+/'], ['include', 'bindings/generic/'], ['include', 'bindings/js/'], ['include', 'bindings/objc/'], - ['exclude', 'bridge/jni/v8/'], - ['exclude', 'bridge/qt/'], - # FIXME: These files shouldn't be in this directory. - ['exclude', 'bridge/testbindings\.cpp'], - ['exclude', 'bridge/testbindings\.mm'], - ['exclude', 'bridge/testqtbindings\.cpp'], - ['exclude', 'editing/[^/]+/'], - ['include', 'editing/mac/'], - ['exclude', 'history/[^/]+/'], - ['include', 'history/cf/'], - ['include', 'history/mac/'], - ['exclude', 'loader/[^/]+/'], - ['include', 'loader/appcache/'], - ['include', 'loader/archive/'], - ['include', 'loader/cache/'], - ['include', 'loader/cf/'], - ['include', 'loader/icon/'], - ['include', 'loader/mac/'], - ['exclude', 'page/[^/]+/'], - ['include', 'page/animation/'], - ['include', 'page/mac/'], - ['exclude', 'platform/[^/]+/'], - ['include', 'platform/animation/'], - ['include', 'platform/audio/'], - ['exclude', 'platform/audio/[^/]+/'], - ['include', 'platform/audio/mac/'], - ['include', 'platform/audio/fftw/'], # FIXME: Is this correct? mkl is the other choice. - ['include', 'platform/audio/resources/'], - ['include', 'platform/cf/'], - ['include', 'platform/cocoa/'], - ['include', 'platform/graphics/'], - ['exclude', 'platform/graphics/[^/]+/'], - ['include', 'platform/graphics/ca/'], - ['include', 'platform/graphics/cg/'], - # FIXME: This file appears to be misplaced. - ['exclude', 'platform/graphics/cg/FontPlatformData\.h'], - ['include', 'platform/graphics/cocoa/'], - ['include', 'platform/graphics/filters/'], - ['include', 'platform/graphics/gpu/'], - ['include', 'platform/graphics/mac/'], - ['include', 'platform/graphics/opengl/'], - ['include', 'platform/graphics/transforms/'], - ['include', 'platform/mac/'], - ['include', 'platform/mock/'], - ['include', 'platform/network/'], - ['exclude', 'platform/network/[^/]+/'], - ['include', 'platform/network/cf'], - ['include', 'platform/network/mac'], - ['include', 'platform/posix/'], - ['include', 'platform/sql/'], - ['exclude', 'platform/sql/chromium'], - ['include', 'platform/text/'], - ['exclude', 'platform/text/[^/]+/'], - ['include', 'platform/text/cf'], - ['include', 'platform/text/mac'], - ['include', 'platform/text/transcoder'], - ['exclude', 'DerivedSources\.cpp$'], - # FIXME: Consider using one or more AllInOne files. - ['exclude', '(Chromium|Win|Qt)\.cpp$'], - ['exclude', 'AllInOne\.cpp$'], - ['exclude', 'WebCore\.gyp/mac/Empty\.cpp$'] - ], - 'mac_framework_headers': [ - '<@(webcore_publicheader_files)', + + # FIXME: This could should move to Source/ThirdParty. + ['exclude', 'thirdparty/'], + + # FIXME: Figure out how to store these patterns in a variable. + ['exclude', '(android|brew|cairo|chromium|curl|efl|freetype|fftw|gstreamer|gtk|haiku|linux|mkl|openvg|pango|qt|skia|soup|symbian|texmap|iphone|v8|win|wince|wx)/'], + ['exclude', '(Android|Brew|Cairo|Curl|Chromium|Efl|Haiku|Gtk|Linux|OpenType|Qt|Safari|Soup|Symbian|V8|Win|WinCE|Wx)\\.(cpp|mm?)$'], + ['exclude', 'Chromium[^/]*\\.(cpp|mm?)$'], + + ['exclude', 'platform/image-decoders/'], + ['exclude', 'platform/image-encoders/'], + + ['exclude', 'bridge/testbindings\\.cpp$'], # Remove from GYPI? + ['exclude', 'bridge/testbindings\\.mm$'], # Remove from GYPI? + ['exclude', 'bridge/testqtbindings\\.cpp$'], # Remove from GYPI? + ['exclude', 'platform/KillRingNone\\.cpp$'], + ['exclude', 'platform/graphics/cg/FontPlatformData\\.h$'], + ['exclude', 'platform/graphics/gpu/LoopBlinnPathProcessor\\.(cpp|h)$'], + ['exclude', 'platform/graphics/gpu/LoopBlinnLocalTriangulator\\.(cpp|h)$'], + ['exclude', 'platform/graphics/gpu/LoopBlinnPathCache\\.(cpp|h)$'], + ['exclude', 'platform/graphics/gpu/LoopBlinnShader\\.(cpp|h)$'], + ['exclude', 'platform/graphics/gpu/LoopBlinnSolidFillShader\\.(cpp|h)$'], + # FIXME: Consider excluding GL as a suffix. + ['exclude', 'platform/graphics/ImageSource\\.cpp$'], + ['exclude', 'platform/graphics/opengl/TextureMapperGL\\.cpp$'], + ['exclude', 'platform/graphics/opentype/OpenTypeUtilities\\.(cpp|h)$'], + ['exclude', 'platform/posix/SharedBufferPOSIX\\.cpp$'], + ['exclude', 'platform/text/Hyphenation\\.cpp$'], + ['exclude', 'platform/text/LocalizedNumberICU\\.cpp$'], + ['exclude', 'platform/text/LocalizedNumberNone\\.cpp$'], + ['exclude', 'platform/text/TextEncodingDetectorNone\\.cpp$'], + ['exclude', 'plugins/PluginDataNone\\.cpp$'], + ['exclude', 'plugins/PluginDatabase\\.cpp$'], + ['exclude', 'plugins/PluginPackageNone\\.cpp$'], + ['exclude', 'plugins/PluginPackage\\.cpp$'], + ['exclude', 'plugins/PluginStream\\.cpp$'], + ['exclude', 'plugins/PluginView\\.cpp$'], + ['exclude', 'plugins/mac/PluginPackageMac\\.cpp$'], + ['exclude', 'plugins/mac/PluginViewMac\\.mm$'], + ['exclude', 'plugins/npapi\\.cpp$'], + + # FIXME: Check whether we need to build these derived source files. + ['exclude', 'JSAbstractView\\.(cpp|h)'], + ['exclude', 'JSElementTimeControl\\.(cpp|h)'], + ['exclude', 'JSMathMLElementWrapperFactory\\.(cpp|h)'], + ['exclude', 'JSSVGExternalResourcesRequired\\.(cpp|h)'], + ['exclude', 'JSSVGFilterPrimitiveStandardAttributes\\.(cpp|h)'], + ['exclude', 'JSSVGFitToViewBox\\.(cpp|h)'], + ['exclude', 'JSSVGLangSpace\\.(cpp|h)'], + ['exclude', 'JSSVGLocatable\\.(cpp|h)'], + ['exclude', 'JSSVGStylable\\.(cpp|h)'], + ['exclude', 'JSSVGTests\\.(cpp|h)'], + ['exclude', 'JSSVGTransformable\\.(cpp|h)'], + ['exclude', 'JSSVGURIReference\\.(cpp|h)'], + ['exclude', 'JSSVGZoomAndPan\\.(cpp|h)'], + ['exclude', 'tokenizer\\.cpp'], + + ['exclude', 'AllInOne\\.cpp$'], + + ['exclude', 'rendering/svg/[^/]+\\.cpp'], + ['include', 'rendering/svg/RenderSVGAllInOne\\.cpp$'], ], 'mac_framework_private_headers': [ '<@(webcore_privateheader_files)', ], - 'xcode_config_file': '../Configurations/WebCore.xcconfig', + 'mac_bundle_resources': [ + '<@(webcore_resource_files)', + ], + 'xcode_config_file': '<(project_dir)/Configurations/WebCore.xcconfig', # FIXME: A number of these actions aren't supposed to run if "${ACTION}" = "installhdrs" 'postbuilds': [ { 'postbuild_name': 'Check For Global Initializers', 'action': [ - 'sh', '<(DEPTH)/gyp/run-if-exists.sh', '<(DEPTH)/../Tools/Scripts/check-for-global-initializers' + 'sh', '<(project_dir)/gyp/run-if-exists.sh', '<(DEPTH)/../Tools/Scripts/check-for-global-initializers' ], }, { 'postbuild_name': 'Check For Exit Time Destructors', 'action': [ - 'sh', '<(DEPTH)/gyp/run-if-exists.sh', '<(DEPTH)/../Tools/Scripts/check-for-exit-time-destructors' + 'sh', '<(project_dir)/gyp/run-if-exists.sh', '<(DEPTH)/../Tools/Scripts/check-for-exit-time-destructors' ], }, { 'postbuild_name': 'Check For Weak VTables and Externals', 'action': [ - 'sh', '<(DEPTH)/gyp/run-if-exists.sh', '<(DEPTH)/../Tools/Scripts/check-for-weak-vtables-and-externals' + 'sh', '<(project_dir)/gyp/run-if-exists.sh', '<(DEPTH)/../Tools/Scripts/check-for-weak-vtables-and-externals' + ], + }, + { + 'postbuild_name': 'Copy Forwarding and ICU Headers', + 'action': [ + 'sh', '<(project_dir)/gyp/copy-forwarding-and-icu-headers.sh' + ], + }, + { + 'postbuild_name': 'Copy Inspector Resources', + 'action': [ + 'sh', '<(project_dir)/gyp/copy-inspector-resources.sh' + ], + }, + { + 'postbuild_name': 'Streamline Inspector Source', + 'action': [ + 'sh', '<(project_dir)/gyp/streamline-inspector-source.sh' ], }, { 'postbuild_name': 'Check For Inappropriate Files in Framework', 'action': [ - 'sh', '<(DEPTH)/gyp/run-if-exists.sh', '<(DEPTH)/../Tools/Scripts/check-for-inappropriate-files-in-framework' + 'sh', '<(project_dir)/gyp/run-if-exists.sh', '<(DEPTH)/../Tools/Scripts/check-for-inappropriate-files-in-framework' ], }, ], @@ -152,8 +189,9 @@ 'xcode_settings': { # FIXME: Remove these overrides once WebCore.xcconfig is # used only by this project. - 'GCC_PREFIX_HEADER': '<(DEPTH)/WebCore/WebCorePrefix.h', - 'INFOPLIST_FILE': '<(DEPTH)/WebCore/Info.plist', + 'GCC_PREFIX_HEADER': '<(project_dir)/WebCorePrefix.h', + 'INFOPLIST_FILE': '<(project_dir)/Info.plist', + 'ALWAYS_SEARCH_USER_PATHS': 'NO', }, }], ], @@ -161,6 +199,10 @@ { 'target_name': 'Derived Sources', 'type': 'none', + 'dependencies': [ + 'WebCoreExportFileGenerator', + ], + 'xcode_config_file': '<(project_dir)/Configurations/WebCore.xcconfig', 'actions': [{ 'action_name': 'Generate Derived Sources', 'inputs': [], @@ -178,10 +220,76 @@ 'inputs': [], 'outputs': [], 'action': [ - 'sh', '<(DEPTH)/gyp/update-info-plist.sh', '<(DEPTH)/WebCore/Info.plist' + 'sh', '<(project_dir)/gyp/update-info-plist.sh', '<(project_dir)/Info.plist' ] }], }, - # FIXME: Add WebCoreExportFileGenerator + { + 'target_name': 'WebCoreExportFileGenerator Generator', + 'type': 'none', + 'actions': [{ + 'action_name': 'Generate Export File Generator', + 'inputs': [ + '<(project_dir)/WebCore.exp.in', + ], + 'outputs': [ + '<@(export_file_generator_files)', + ], + 'action': [ + 'sh', '<(project_dir)/gyp/generate-webcore-export-file-generator.sh', + ], + }], + }, + { + 'target_name': 'WebCoreExportFileGenerator', + 'type': 'executable', + 'dependencies': [ + 'WebCoreExportFileGenerator Generator', + ], + 'include_dirs': [ + '<(project_dir)/ForwardingHeaders', + ], + 'xcode_config_file': '<(project_dir)/Configurations/WebCore.xcconfig', + 'configurations': { + 'Production': { + 'EXPORTED_SYMBOLS_FILE': '', + 'GCC_OPTIMIZATION_LEVEL': '0', + 'INSTALL_PATH': '/usr/local/bin', + 'OTHER_LDFLAGS': '', + 'SKIP_INSTALL': 'YES', + }, + 'Release': { + 'xcode_settings': { + 'EXPORTED_SYMBOLS_FILE': '', + 'GCC_OPTIMIZATION_LEVEL': '0', + 'INSTALL_PATH': '/usr/local/bin', + 'OTHER_LDFLAGS': '', + 'SKIP_INSTALL': 'YES', + }, + }, + 'Debug': { + 'xcode_settings': { + 'EXPORTED_SYMBOLS_FILE': '', + 'GCC_OPTIMIZATION_LEVEL': '0', + 'INSTALL_PATH': '/usr/local/bin', + 'OTHER_LDFLAGS': '', + 'SKIP_INSTALL': 'YES', + }, + }, + }, + 'sources': [ + '<@(export_file_generator_files)', + ], + 'conditions': [ + ['OS=="mac"', { + 'xcode_settings': { + # FIXME: Remove these overrides once WebCore.xcconfig is + # used only by this project. + 'GCC_PREFIX_HEADER': '<(project_dir)/WebCorePrefix.h', + 'INFOPLIST_FILE': '<(project_dir)/Info.plist', + }, + }], + ], + }, ], # targets } diff --git a/Source/WebCore/gyp/copy-forwarding-and-icu-headers.sh b/Source/WebCore/gyp/copy-forwarding-and-icu-headers.sh new file mode 100755 index 0000000..8f19f09 --- /dev/null +++ b/Source/WebCore/gyp/copy-forwarding-and-icu-headers.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +rsync -aq --exclude ".svn" --exclude ".DS_Store" "$SRCROOT/../ForwardingHeaders" "$BUILT_PRODUCTS_DIR/$PRIVATE_HEADERS_FOLDER_PATH" +rsync -aq --exclude ".svn" --exclude ".DS_Store" "$SRCROOT/../icu" "$BUILT_PRODUCTS_DIR/$PRIVATE_HEADERS_FOLDER_PATH" diff --git a/Source/WebCore/gyp/copy-inspector-resources.sh b/Source/WebCore/gyp/copy-inspector-resources.sh new file mode 100755 index 0000000..9795624 --- /dev/null +++ b/Source/WebCore/gyp/copy-inspector-resources.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +# Copy all the Inspector front-end resources. +ditto "${SRCROOT}/../inspector/front-end" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/inspector" +ditto "${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore/InspectorBackendStub.js" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/inspector" + +# Remove the WebKit.qrc file since it is not used on the Mac (this file is for Qt). +rm -f "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/inspector/WebKit.qrc" + +# Remove *.re2js files, they are only used to generate some .js files. +rm -f "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/inspector/"*.re2js + +# Remove any .svn directories that may have been copied over. +find "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/inspector" -name ".svn" -type d | xargs rm -rf diff --git a/Source/WebCore/gyp/generate-webcore-export-file-generator.sh b/Source/WebCore/gyp/generate-webcore-export-file-generator.sh new file mode 100755 index 0000000..f93f916 --- /dev/null +++ b/Source/WebCore/gyp/generate-webcore-export-file-generator.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +OUTPUT_DIR="${BUILT_PRODUCTS_DIR}/DerivedSources/${PROJECT_NAME}" +mkdir -p "${OUTPUT_DIR}" +"${SRCROOT}"/../make-export-file-generator "${SRCROOT}/../WebCore.exp.in" "${OUTPUT_DIR}/ExportFileGenerator.cpp" diff --git a/Source/WebCore/gyp/run-if-exists.sh b/Source/WebCore/gyp/run-if-exists.sh new file mode 100755 index 0000000..242ffc8 --- /dev/null +++ b/Source/WebCore/gyp/run-if-exists.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +if [ -f $1 ]; then + $1 || exit $?; +fi diff --git a/Source/WebCore/gyp/streamline-inspector-source.sh b/Source/WebCore/gyp/streamline-inspector-source.sh new file mode 100755 index 0000000..330d6ed --- /dev/null +++ b/Source/WebCore/gyp/streamline-inspector-source.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +# Don't do anything for Debug builds, so the Inspector is easier to debug. +if [[ ${CONFIGURATION:=Debug} == "Debug" ]]; then + exit +fi + +# Combine all script resources in the inspector.html file. +"$SRCROOT/../combine-javascript-resources" --input-html "${SRCROOT}/../inspector/front-end/inspector.html" --generated-scripts-dir ${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore --output-dir "${DERIVED_FILE_DIR}/WebCore" --output-script-name inspector.js + +if [ -d "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/inspector" ]; then + # Remove any JavaScript files, since they will be replaced with the combined file. + cd "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/inspector" + rm *.js + + # Copy the modified HTML file and the combined script. + cp "${DERIVED_FILE_DIR}/WebCore/inspector.html" inspector.html + cp "${DERIVED_FILE_DIR}/WebCore/inspector.js" inspector.js +fi diff --git a/Source/WebCore/gyp/update-info-plist.sh b/Source/WebCore/gyp/update-info-plist.sh new file mode 100755 index 0000000..d02ecce --- /dev/null +++ b/Source/WebCore/gyp/update-info-plist.sh @@ -0,0 +1,4 @@ +# Touch Info.plist to let Xcode know it needs to copy it into the built product +if [[ "${CONFIGURATION}" != "Production" ]]; then + touch "$1"; +fi |