2011-03-06 Adam Barth <abarth@webkit.org>
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Mar 2011 09:25:37 +0000 (09:25 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Mar 2011 09:25:37 +0000 (09:25 +0000)
        Reviewed by Eric Seidel.

        Filter sources in WebCore GYP build for Mac
        https://bugs.webkit.org/show_bug.cgi?id=55857

        This patch removes a large number of files that do not build as part of
        the Mac build.  I'm not fully sold on this method of
        including/excluding files, but it's the "gyp way" so we should probably
        try it first.

        This patch also sets xcode_list_excluded_files to 0, which removes the
        excluded files from the Xcode project file, which is necessary in order
        to prevent the header map feature from including the wrong header file.

        * gyp/WebCore.gyp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@80459 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/WebCore.gypi
Source/WebCore/gyp/WebCore.gyp
Source/gyp/configure

index 95faa9a..2f5f9e0 100644 (file)
@@ -1,3 +1,21 @@
+2011-03-06  Adam Barth  <abarth@webkit.org>
+
+        Reviewed by Eric Seidel.
+
+        Filter sources in WebCore GYP build for Mac
+        https://bugs.webkit.org/show_bug.cgi?id=55857
+
+        This patch removes a large number of files that do not build as part of
+        the Mac build.  I'm not fully sold on this method of
+        including/excluding files, but it's the "gyp way" so we should probably
+        try it first.
+
+        This patch also sets xcode_list_excluded_files to 0, which removes the
+        excluded files from the Xcode project file, which is necessary in order
+        to prevent the header map feature from including the wrong header file.
+
+        * gyp/WebCore.gyp:
+
 2011-03-07  Ryuan Choi  <ryuan.choi@samsung.com>
 
         Unreviewed EFL build fix.
index f8f0b71..6eab6c4 100644 (file)
@@ -1,85 +1,5 @@
 {
     'variables': {
-        'webcore_include_dirs': [
-          '.',
-          'accessibility',
-          'accessibility/chromium',
-          'bindings',
-          'bindings/generic',
-          'bindings/v8',
-          'bindings/v8/custom',
-          'bindings/v8/specialization',
-          'bridge',
-          'bridge/jni',
-          'bridge/jni/v8',
-          'css',
-          'dom',
-          'dom/default',
-          'editing',
-          'fileapi',
-          'history',
-          'html',
-          'html/canvas',
-          'html/parser',
-          'html/shadow',
-          'icu',
-          'inspector',
-          'loader',
-          'loader/appcache',
-          'loader/archive',
-          'loader/cache',
-          'loader/icon',
-          'mathml',
-          'notifications',
-          'page',
-          'page/animation',
-          'page/chromium',
-          'platform',
-          'platform/animation',
-          'platform/audio',
-          'platform/audio/chromium',
-          'platform/chromium',
-          'platform/graphics',
-          'platform/graphics/chromium',
-          'platform/graphics/filters',
-          'platform/graphics/gpu',
-          'platform/graphics/opentype',
-          'platform/graphics/skia',
-          'platform/graphics/transforms',
-          'platform/image-decoders',
-          'platform/image-decoders/bmp',
-          'platform/image-decoders/gif',
-          'platform/image-decoders/ico',
-          'platform/image-decoders/jpeg',
-          'platform/image-decoders/png',
-          'platform/image-decoders/skia',
-          'platform/image-decoders/webp',
-          'platform/image-decoders/xbm',
-          'platform/image-encoders/skia',
-          'platform/mock',
-          'platform/network',
-          'platform/network/chromium',
-          'platform/sql',
-          'platform/text',
-          'platform/text/transcoder',
-          'plugins',
-          'plugins/chromium',
-          'rendering',
-          'rendering/style',
-          'rendering/svg',
-          'storage',
-          'storage/chromium',
-          'svg',
-          'svg/animation',
-          'svg/graphics',
-          'svg/graphics/filters',
-          'svg/properties',
-          'thirdparty/glu',
-          'webaudio',
-          'websockets',
-          'workers',
-          'xml',
-        ],
         # These headers are part of WebCore's public API in the Apple Mac build.
         'webcore_publicheader_files': [
           #FIXME: Add headers.
index ae75c05..b811b52 100644 (file)
         # FIXME: Add 'Copy Inspector Resources',
       ],
       'include_dirs': [
-        '<@(webcore_include_dirs)',
+        '<(DEPTH)/WebCore/icu',
         '<(DEPTH)/WebCore/ForwardingHeaders',
+        '<(PRODUCT_DIR)/usr/local/include',
+        '/usr/include/libxml2',
       ],
       'sources': [
         '<@(webcore_files)',
         'libxml2.dylib',
         '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)',
       ],
index 48f6ea7..cd2b126 100755 (executable)
@@ -43,6 +43,8 @@ def create_project(project):
     subprocess.call([
         'gyp',  # FIXME: gyp shouldn't need to be in the PATH.
         os.path.join(project, 'gyp', project + '.gyp'),
+        '-G',
+        'xcode_list_excluded_files=0',
         '--depth=.',
     ])