Changeset 63997 in webkit


Ignore:
Timestamp:
Jul 23, 2010 2:59:13 PM (14 years ago)
Author:
ddkilzer@apple.com
Message:

<http://webkit.org/b/42911> Update ruby tools to work with shallow framework bundles

Reviewed by Mark Rowe.

  • Scripts/check-for-inappropriate-files-in-framework: Added

check for the SHALLOW_BUNDLE environment variable so that the
script will work with iOS WebKit builds.

  • Scripts/check-for-webkit-framework-include-consistency: Ditto.
Location:
trunk/WebKitTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r63949 r63997  
     12010-07-23  David Kilzer  <ddkilzer@apple.com>
     2
     3        <http://webkit.org/b/42911> Update ruby tools to work with shallow framework bundles
     4
     5        Reviewed by Mark Rowe.
     6
     7        * Scripts/check-for-inappropriate-files-in-framework: Added
     8        check for the SHALLOW_BUNDLE environment variable so that the
     9        script will work with iOS WebKit builds.
     10        * Scripts/check-for-webkit-framework-include-consistency: Ditto.
     11
    1122010-07-22  Darin Adler  <darin@apple.com>
    213
  • trunk/WebKitTools/Scripts/check-for-inappropriate-files-in-framework

    r57326 r63997  
    2626base_directory = ENV['TARGET_BUILD_DIR'] or throw "Unable to find TARGET_BUILD_DIR in the environment!"
    2727project_name = ENV['PROJECT_NAME'] or throw "Unable to find PROJECT_NAME in the environment!"
     28is_shallow_bundle = (ENV['SHALLOW_BUNDLE'] || "NO").upcase == "YES"
    2829
    2930$INAPPROPRIATE_FILES = { "WebCore" => { "Resources" => ["*.css", "*.in", "*.idl"] } }
     
    4243end
    4344
    44 def check_framework framework
     45def check_framework framework, is_shallow_bundle
    4546  $INAPPROPRIATE_FILES[framework].each do |directory, patterns|
    46     Dir.chdir "#{framework}.framework/Versions/A/#{directory}" do
     47    framework_bundle_path = is_shallow_bundle ? "#{framework}.framework" : "#{framework}.framework/Versions/A/#{directory}"
     48    Dir.chdir framework_bundle_path do
    4749      patterns.each do |pattern|
    4850        Dir.glob(pattern).each do |inappropriate_file|
    49           print_inappropriate_file_error framework, "Resources/#{inappropriate_file}"
     51          print_inappropriate_file_error framework, is_shallow_bundle ? inappropriate_file : "#{directory}/#{inappropriate_file}"
    5052          File.unlink inappropriate_file
    5153        end
     
    5557end
    5658
    57 check_framework project_name
     59check_framework project_name, is_shallow_bundle
    5860
    5961if $error_printed
  • trunk/WebKitTools/Scripts/check-for-webkit-framework-include-consistency

    r55565 r63997  
    2525
    2626
    27 base_directory = ENV['TARGET_BUILD_DIR']
     27base_directory = ENV['TARGET_BUILD_DIR'] or throw "Unable to find TARGET_BUILD_DIR in the environment!"
     28is_shallow_bundle = (ENV['SHALLOW_BUNDLE'] || "NO").upcase == "YES"
    2829
    2930unless base_directory
     
    4546end
    4647
    47 def build_header_maps
    48   all_headers = `find WebKit.framework/Versions/A/{,Private}Headers -type f -name '*.h'`.split
     48def build_header_maps is_shallow_bundle
     49  current_version_path = is_shallow_bundle ? "" : "Versions/A/"
     50  all_headers = `find WebKit.framework/#{current_version_path}{,Private}Headers -type f -name '*.h'`.split
    4951
    5052  all_headers.each do |header|
     
    98100end
    99101
    100 build_header_maps
     102build_header_maps is_shallow_bundle
    101103
    102104$HEADERS_BY_TYPE.each do |header_type, headers|
Note: See TracChangeset for help on using the changeset viewer.