Changeset 84994 in webkit


Ignore:
Timestamp:
Apr 26, 2011 6:08:59 PM (13 years ago)
Author:
kevino@webkit.org
Message:

Rubberstamped by Eric Seidel.

Enable waf to be used to build other ports
https://bugs.webkit.org/show_bug.cgi?id=58213

Location:
trunk
Files:
6 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r84734 r84994  
     12011-04-26  Kevin Ollivier  <kevino@theolliviers.com>
     2
     3        Rubberstamped by Eric Seidel.
     4
     5        Enable waf to be used to build other ports
     6        https://bugs.webkit.org/show_bug.cgi?id=58213
     7
     8        * wscript:
     9
    1102011-04-22  Sheriff Bot  <webkit.review.bot@gmail.com>
    211
  • trunk/Source/JavaScriptCore/ChangeLog

    r84991 r84994  
     12011-04-26  Kevin Ollivier  <kevino@theolliviers.com>
     2
     3        Rubberstamped by Eric Seidel.
     4
     5        Enable waf to be used to build other ports
     6        https://bugs.webkit.org/show_bug.cgi?id=58213
     7
     8        * wscript:
     9
    1102011-04-26  Sam Weinig  <sam@webkit.org>
    211
  • trunk/Source/JavaScriptCore/wscript

    r83510 r84994  
    3030from settings import *
    3131
    32 jscore_excludes = ['jsc.cpp', 'ProfilerServer.mm', 'ExecutableAllocatorPosix.cpp']
    33 jscore_excludes.extend(get_excludes(jscore_dir, ['*Brew.cpp', '*CF.cpp', '*Symbian.cpp']))
     32def build(bld):
    3433
    35 sources = []
    36 
    37 jscore_excludes.extend(get_excludes(jscore_dir, ['*None.cpp']))
    38 
    39 if build_port == "wx":
    40     if building_on_win32:
    41         jscore_excludes += ['MarkStackPosix.cpp', 'OSAllocatorPosix.cpp', 'ThreadingPthreads.cpp']
    42         sources += ['heap/MarkStackWin.cpp']
    43     else:
    44         jscore_excludes.append('JSStringRefBSTR.cpp')
    45         jscore_excludes.extend(get_excludes(jscore_dir, ['*Win.cpp']))
    46    
    47 def build(bld):
    4834    import Options
    4935
    50     full_dirs = get_dirs_for_features(jscore_dir, features=[build_port], dirs=jscore_dirs)
     36    jscore_excludes = ['jsc.cpp', 'ProfilerServer.mm', 'ExecutableAllocatorPosix.cpp']
     37    jscore_excludes.extend(get_excludes(jscore_dir, ['*Brew.cpp', '*CF.cpp', '*Symbian.cpp']))
     38
     39    jscore_excludes.extend(get_excludes(jscore_dir, ['*None.cpp']))
     40
     41    sources = []
     42
     43    if Options.options.port == "wx":
     44        if building_on_win32:
     45            jscore_excludes += ['MarkStackPosix.cpp', 'OSAllocatorPosix.cpp', 'ThreadingPthreads.cpp']
     46            sources += ['heap/MarkStackWin.cpp']
     47        else:
     48            jscore_excludes.append('JSStringRefBSTR.cpp')
     49            jscore_excludes.extend(get_excludes(jscore_dir, ['*Win.cpp']))
     50
     51    full_dirs = get_dirs_for_features(jscore_dir, features=[Options.options.port.lower()], dirs=jscore_dirs)
    5152
    5253    includes = common_includes + full_dirs
  • trunk/Tools/ChangeLog

    r84991 r84994  
     12011-04-26  Kevin Ollivier  <kevino@theolliviers.com>
     2
     3        Rubberstamped by Eric Seidel.
     4
     5        Enable waf to be used to build other ports
     6        https://bugs.webkit.org/show_bug.cgi?id=58213
     7
     8        * Scripts/build-webkit:
     9        * Scripts/webkitdirs.pm:
     10        * waf: Added.
     11        * waf/build: Added.
     12        * waf/build/build_utils.py: Added.
     13        * waf/build/settings.py: Added.
     14        * waf/build/waf_extensions.py: Added.
     15        * waf/build/wxpresets.py: Added.
     16
    1172011-04-26  Sam Weinig  <sam@webkit.org>
    218
  • trunk/Tools/Scripts/build-webkit

    r84991 r84994  
    543543
    544544if (isWx()) {
     545    $makeArgs .= " --port=wx";
     546
    545547    downloadWafIfNeeded();
    546548    @options = split(/ /, $makeArgs);
  • trunk/Tools/Scripts/webkitdirs.pm

    r84915 r84994  
    13181318{
    13191319    # get / update waf if needed
    1320     my $waf = "$sourceDir/Tools/wx/waf";
     1320    my $waf = "$sourceDir/Tools/waf/waf";
    13211321    my $wafURL = 'http://wxwebkit.kosoftworks.com/downloads/deps/waf';
    13221322    if (!-f $waf) {
     
    13361336    }
    13371337    my $sourceDir = sourceDir();
    1338     my $newPythonPath = "$sourceDir/Tools/wx/build:$pythonPath";
     1338    my $newPythonPath = "$sourceDir/Tools/waf/build:$pythonPath";
    13391339    if (isCygwin()) {
    13401340        $newPythonPath = `cygpath --mixed --path $newPythonPath`;
     
    13441344    print "Building $project\n";
    13451345
    1346     my $wafCommand = "$sourceDir/Tools/wx/waf";
     1346    my $wafCommand = "$sourceDir/Tools/waf/waf";
    13471347    if ($ENV{'WXWEBKIT_WAF'}) {
    13481348        $wafCommand = $ENV{'WXWEBKIT_WAF'};
  • trunk/wscript

    r82018 r84994  
    3030from settings import *
    3131
    32 if build_port == "wx":
    33     webcore_dirs.extend(['Source/WebKit/wx', 'Source/WebKit/wx/WebKitSupport'])
    34 
    35 wk_includes = ['.',
    36                 os.path.join(wk_root, 'Source', 'JavaScriptCore'),
    37                 os.path.join(wk_root, 'Source', 'JavaScriptCore', 'wtf', 'text'),
    38                 os.path.join(wk_root, 'Source', 'WebCore'),
    39                 os.path.join(wk_root, 'Source', 'WebCore', 'DerivedSources'),
    40                 os.path.join(wk_root, 'Source', 'WebCore', 'platform', 'image-decoders'),
    41                 os.path.join(wk_root, 'Source', 'WebCore', 'platform', 'win'),
    42                 os.path.join(wk_root, 'Source', 'WebCore', 'workers'),
    43                 os.path.join(output_dir),
    44         ]
    45 
    46 if build_port == "wx":
    47     wk_includes.append(os.path.join(wk_root, 'Source', 'WebKit', 'wx'))
    48     wk_includes.append(os.path.join(wk_root, 'Source', 'WebCore', 'platform', 'wx', 'wxcode'))
    49 
    50 if sys.platform.startswith("win"):
    51     wk_includes.append(os.path.join(wk_root, 'Source', 'WebCore', 'platform', 'win'))
    52     wk_includes.append(os.path.join(wk_root, 'Source', 'WebCore', 'platform', 'graphics', 'win'))
    53 
    54 windows_deps = [
    55                 'lib/pthreadVC2.dll',
    56                 'bin/icuuc40.dll', 'bin/icudt40.dll', 'bin/icuin40.dll',
    57                 'bin/libcurl.dll', 'bin/libeay32.dll', 'bin/ssleay32.dll', 'bin/zlib1.dll',
    58                 'lib/sqlite3.dll', 'bin/libxml2.dll', 'bin/libxslt.dll', 'bin/iconv.dll',
    59                 ]
    60 
    61 webcore_sources = {}
    62 
    63 if build_port == "wx":
    64     webcore_sources['wx'] = [
    65         'Source/WebCore/bindings/cpp/WebDOMEventTarget.cpp',
    66         'Source/WebCore/platform/KillRingNone.cpp',                     
    67         'Source/WebCore/platform/text/LocalizedNumberNone.cpp'
    68     ] 
    69 
    70     if building_on_win32:
    71         # make sure platform/wx comes after this so we get the right
    72         # FontPlatformData.h
    73         webcore_dirs.extend(['Source/WebCore/platform/wx/wxcode/win', 'Source/WebCore/plugins/win'])
    74         webcore_sources['wx-win'] = [
    75                'Source/WebCore/platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp',
    76                'Source/WebCore/platform/graphics/win/TransformationMatrixWin.cpp',
    77                'Source/WebCore/platform/ScrollAnimatorWin.cpp',
    78                # wxTimer on Windows has a bug that causes it to eat crashes in callbacks
    79                # so we need to use the Win port's implementation until the wx bug fix is
    80                # widely available (it was fixed in 2.8.10).
    81                'Source/WebCore/platform/win/SharedTimerWin.cpp',
    82                'Source/WebCore/platform/win/WebCoreInstanceHandle.cpp',
    83                # Use the Windows plugin architecture
    84                #'Source/WebCore/plugins/win/PluginDataWin.cpp',
    85                'Source/WebCore/plugins/win/PluginDatabaseWin.cpp',
    86                'Source/WebCore/plugins/win/PluginMessageThrottlerWin.cpp',
    87                'Source/WebCore/plugins/win/PluginPackageWin.cpp',
    88                'Source/WebCore/plugins/win/PluginViewWin.cpp',
    89         ]
    90     elif sys.platform.startswith('darwin'):
    91         webcore_dirs.append('Source/WebCore/plugins/mac')
    92         webcore_dirs.append('Source/WebCore/platform/wx/wxcode/mac/carbon')
    93         webcore_dirs.append('Source/WebCore/platform/mac')
    94         webcore_dirs.append('Source/WebCore/platform/text/mac')
    95         webcore_sources['wx-mac'] = [
    96                'Source/WebCore/platform/mac/PurgeableBufferMac.cpp',
    97                'Source/WebCore/platform/mac/WebCoreNSStringExtras.mm',
    98                'Source/WebCore/platform/mac/WebCoreSystemInterface.mm',
    99                'Source/WebCore/platform/graphics/cg/FloatSizeCG.cpp',
    100                'Source/WebCore/platform/graphics/mac/ComplexTextController.cpp',
    101                'Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.cpp',
    102                'Source/WebCore/platform/graphics/mac/ComplexTextControllerATSUI.cpp',
    103                'Source/WebCore/platform/graphics/mac/GlyphPageTreeNodeMac.cpp',
    104                'Source/WebCore/platform/graphics/mac/SimpleFontDataATSUI.mm',
    105                'Source/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp',
    106                'Source/WebCore/platform/graphics/wx/FontPlatformDataWxMac.mm',
    107                'Source/WebCore/platform/text/mac/ShapeArabic.c',
    108                'Source/WebCore/platform/wx/wxcode/mac/carbon/fontprops.mm',
    109                'Source/WebCore/plugins/mac/PluginPackageMac.cpp',
    110                'Source/WebCore/plugins/mac/PluginViewMac.mm'
    111         ]
    112     else:
    113         webcore_sources['wx-gtk'] = [
    114                'Source/WebCore/plugins/PluginViewNone.cpp',
    115                'Source/WebCore/plugins/PluginPackageNone.cpp'
    116         ]
    117         webcore_dirs.append('Source/WebCore/platform/wx/wxcode/gtk')
    118        
    11932import TaskGen
    12033from TaskGen import taskgen, feature, after
    12134import Task, ccroot
    12235
    123 def generate_webcore_derived_sources():
     36def generate_webcore_derived_sources(conf):
    12437    # build the derived sources
    12538    derived_sources_dir = os.path.join(webcore_dir, 'DerivedSources')
     
    13750        oldpath = os.environ["PATH"]
    13851        os.environ["PATH"] = "/usr/bin" + os.pathsep + os.environ["PATH"]
    139     os.system('make -f %s/DerivedSources.make WebCore=%s SOURCE_ROOT=%s all FEATURE_DEFINES="%s"' % (wc_dir, wc_dir, wc_dir, ' '.join(feature_defines)))
     52    os.system('make -f %s/DerivedSources.make WebCore=%s SOURCE_ROOT=%s all FEATURE_DEFINES="%s"' % (wc_dir, wc_dir, wc_dir, conf.env["FEATURE_DEFINES"]))
    14053    if building_on_win32:
    14154        os.environ["PATH"] = oldpath
    14255    os.chdir(olddir)
    14356
    144 def generate_jscore_derived_sources():
     57def generate_jscore_derived_sources(conf):
    14558    # build the derived sources
    14659    js_dir = jscore_dir
     
    15871        oldpath = os.environ["PATH"]
    15972        os.environ["PATH"] = "/usr/bin" + os.pathsep + os.environ["PATH"]
    160     command = 'make -f %s/DerivedSources.make JavaScriptCore=%s BUILT_PRODUCTS_DIR=%s all FEATURE_DEFINES="%s"' % (js_dir, js_dir, js_dir, ' '.join(feature_defines))
     73    command = 'make -f %s/DerivedSources.make JavaScriptCore=%s BUILT_PRODUCTS_DIR=%s all FEATURE_DEFINES="%s"' % (js_dir, js_dir, js_dir, conf.env["FEATURE_DEFINES"])
    16174    os.system(command)
    16275    if building_on_win32:
     
    16982def configure(conf):
    17083    common_configure(conf)
    171     generate_jscore_derived_sources()
    172     generate_webcore_derived_sources()
    173     if build_port == "wx" and sys.platform.startswith('win'):
     84    generate_jscore_derived_sources(conf)
     85    generate_webcore_derived_sources(conf)
     86    if Options.options.port == "wx" and sys.platform.startswith('win'):
    17487        graphics_dir = os.path.join(wk_root, 'Source', 'WebCore', 'platform', 'graphics')
    17588        # HACK ALERT: MSVC automatically adds the source file's directory as the first entry in the
     
    189102        shutil.copy(api_file, os.path.join(jscore_out_dir, os.path.basename(api_file)))
    190103
    191     if build_port == "wx" and Options.options.wxpython:
     104    if Options.options.port == "wx" and Options.options.wxpython:
    192105        common_configure(conf)
    193106        conf.check_tool('swig', tooldir='Source/WebKit/wx/bindings/python')
    194107        conf.check_swig_version('1.3.29')
    195108
    196 def build(bld): 
     109def build(bld):
     110
     111    webcore_dirs = list(webcore_dirs_common)
     112
     113    if Options.options.port == "wx":
     114        webcore_dirs.extend(['Source/WebKit/wx', 'Source/WebKit/wx/WebKitSupport'])
     115   
     116    wk_includes = ['.',
     117                    os.path.join(wk_root, 'Source', 'JavaScriptCore'),
     118                    os.path.join(wk_root, 'Source', 'JavaScriptCore', 'wtf', 'text'),
     119                    os.path.join(wk_root, 'Source', 'WebCore'),
     120                    os.path.join(wk_root, 'Source', 'WebCore', 'DerivedSources'),
     121                    os.path.join(wk_root, 'Source', 'WebCore', 'platform', 'image-decoders'),
     122                    os.path.join(wk_root, 'Source', 'WebCore', 'platform', 'win'),
     123                    os.path.join(wk_root, 'Source', 'WebCore', 'workers'),
     124                    os.path.join(output_dir),
     125            ]
     126   
     127    if Options.options.port == "wx":
     128        wk_includes.append(os.path.join(wk_root, 'Source', 'WebKit', 'wx'))
     129        wk_includes.append(os.path.join(wk_root, 'Source', 'WebCore', 'platform', 'wx', 'wxcode'))
     130   
     131    if sys.platform.startswith("win"):
     132        wk_includes.append(os.path.join(wk_root, 'Source', 'WebCore', 'platform', 'win'))
     133        wk_includes.append(os.path.join(wk_root, 'Source', 'WebCore', 'platform', 'graphics', 'win'))
     134   
     135    windows_deps = [
     136                    'lib/pthreadVC2.dll',
     137                    'bin/icuuc40.dll', 'bin/icudt40.dll', 'bin/icuin40.dll',
     138                    'bin/libcurl.dll', 'bin/libeay32.dll', 'bin/ssleay32.dll', 'bin/zlib1.dll',
     139                    'lib/sqlite3.dll', 'bin/libxml2.dll', 'bin/libxslt.dll', 'bin/iconv.dll',
     140                    ]
     141   
     142    webcore_sources = {}
     143   
     144    if Options.options.port == "wx":
     145        webcore_sources['wx'] = [
     146            'Source/WebCore/bindings/cpp/WebDOMEventTarget.cpp',
     147            'Source/WebCore/platform/KillRingNone.cpp',                     
     148            'Source/WebCore/platform/text/LocalizedNumberNone.cpp'
     149        ] 
     150   
     151        if building_on_win32:
     152            # make sure platform/wx comes after this so we get the right
     153            # FontPlatformData.h
     154            webcore_dirs.extend(['Source/WebCore/platform/wx/wxcode/win', 'Source/WebCore/plugins/win'])
     155            webcore_sources['wx-win'] = [
     156                   'Source/WebCore/platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp',
     157                   'Source/WebCore/platform/graphics/win/TransformationMatrixWin.cpp',
     158                   'Source/WebCore/platform/ScrollAnimatorWin.cpp',
     159                   # wxTimer on Windows has a bug that causes it to eat crashes in callbacks
     160                   # so we need to use the Win port's implementation until the wx bug fix is
     161                   # widely available (it was fixed in 2.8.10).
     162                   'Source/WebCore/platform/win/SharedTimerWin.cpp',
     163                   'Source/WebCore/platform/win/WebCoreInstanceHandle.cpp',
     164                   # Use the Windows plugin architecture
     165                   #'Source/WebCore/plugins/win/PluginDataWin.cpp',
     166                   'Source/WebCore/plugins/win/PluginDatabaseWin.cpp',
     167                   'Source/WebCore/plugins/win/PluginMessageThrottlerWin.cpp',
     168                   'Source/WebCore/plugins/win/PluginPackageWin.cpp',
     169                   'Source/WebCore/plugins/win/PluginViewWin.cpp',
     170            ]
     171        elif sys.platform.startswith('darwin'):
     172            webcore_dirs.append('Source/WebCore/plugins/mac')
     173            webcore_dirs.append('Source/WebCore/platform/wx/wxcode/mac/carbon')
     174            webcore_dirs.append('Source/WebCore/platform/mac')
     175            webcore_dirs.append('Source/WebCore/platform/text/mac')
     176            webcore_sources['wx-mac'] = [
     177                   'Source/WebCore/platform/mac/PurgeableBufferMac.cpp',
     178                   'Source/WebCore/platform/mac/WebCoreNSStringExtras.mm',
     179                   'Source/WebCore/platform/mac/WebCoreSystemInterface.mm',
     180                   'Source/WebCore/platform/graphics/cg/FloatSizeCG.cpp',
     181                   'Source/WebCore/platform/graphics/mac/ComplexTextController.cpp',
     182                   'Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.cpp',
     183                   'Source/WebCore/platform/graphics/mac/ComplexTextControllerATSUI.cpp',
     184                   'Source/WebCore/platform/graphics/mac/GlyphPageTreeNodeMac.cpp',
     185                   'Source/WebCore/platform/graphics/mac/SimpleFontDataATSUI.mm',
     186                   'Source/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp',
     187                   'Source/WebCore/platform/graphics/wx/FontPlatformDataWxMac.mm',
     188                   'Source/WebCore/platform/text/mac/ShapeArabic.c',
     189                   'Source/WebCore/platform/wx/wxcode/mac/carbon/fontprops.mm',
     190                   'Source/WebCore/plugins/mac/PluginPackageMac.cpp',
     191                   'Source/WebCore/plugins/mac/PluginViewMac.mm'
     192            ]
     193        else:
     194            webcore_sources['wx-gtk'] = [
     195                   'Source/WebCore/plugins/PluginViewNone.cpp',
     196                   'Source/WebCore/plugins/PluginPackageNone.cpp'
     197            ]
     198            webcore_dirs.append('Source/WebCore/platform/wx/wxcode/gtk')
     199       
     200
    197201    import TaskGen
    198     global wk_includes
    199202
    200203    # FIXME: Does this need to be Source/JavaScriptCore?
     
    205208        TaskGen.task_gen.mappings['.m'] = TaskGen.task_gen.mappings['.cxx']
    206209
    207     features = [build_port]
     210    features = [Options.options.port.lower()]
    208211    exclude_patterns = ['*AllInOne.cpp', '*Brew.cpp', '*CFNet.cpp', '*Chromium*.cpp',
    209212            '*Efl.cpp', '*Gtk.cpp', '*Haiku.cpp', '*Mac.cpp', '*None.cpp', '*Qt.cpp', '*Safari.cpp',
    210213            'test*bindings.*', '*WinCE.cpp', "WebDOMCanvas*.cpp", "WebDOMSVG*.cpp"]
    211     if build_port == 'wx':
     214    if Options.options.port == 'wx':
    212215        features.append('curl')
    213216        exclude_patterns.append('*Win.cpp')
     
    262265    excludes = []
    263266   
    264     if build_port == 'wx':
     267    if Options.options.port == 'wx':
    265268        excludes = get_excludes(webcore_dir, exclude_patterns)
    266269        excludes.extend(['UserStyleSheetLoader.cpp', 'RenderMediaControls.cpp'])
     
    344347    bld.add_group()
    345348   
    346     if build_port == "wx":   
     349    if Options.options.port == "wx":   
    347350        bld.add_subdirs(['Tools/DumpRenderTree', 'Tools/wx/browser', 'Source/WebKit/wx/bindings/python'])
Note: See TracChangeset for help on using the changeset viewer.