Changeset 195582 in webkit


Ignore:
Timestamp:
Jan 25, 2016 10:12:50 PM (8 years ago)
Author:
commit-queue@webkit.org
Message:

Fix internal Windows build
https://bugs.webkit.org/show_bug.cgi?id=153469

Patch by Alex Christensen <achristensen@webkit.org> on 2016-01-25
Reviewed by Brent Fulgham.

.:

  • Source/cmake/WebKitMacros.cmake:

Pass the GPERF_EXECUTABLE that we found to make-hash-tools.pl.

Source/WebCore:

  • CMakeLists.txt:

Pass the GPERF_EXECUTABLE that we found to perl scripts so they can use it instead of just calling gperf.
This is needed for builds where gperf is not in the PATH.

  • DerivedSources.make:

Pass "gperf" as the gperf command to retain existing functionality on mac.

  • bindings/scripts/preprocess-idls.pl:

(CygwinPathIfNeeded):

  • bindings/scripts/preprocessor.pm:

(applyPreprocessor):
Add /cygdrive/c/cygwin/bin to the PATH before calling cygpath.
This is needed for builds where we are using cygwin, but C:/cygwin/bin is not in the PATH.

  • css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
  • css/makeSelectorPseudoElementsMap.py:
  • css/makeprop.pl:
  • platform/network/create-http-header-name-table:

Use the gperf executable passed in as a command line parameter if it is given.

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r195512 r195582  
     12016-01-25  Alex Christensen  <achristensen@webkit.org>
     2
     3        Fix internal Windows build
     4        https://bugs.webkit.org/show_bug.cgi?id=153469
     5
     6        Reviewed by Brent Fulgham.
     7
     8        * Source/cmake/WebKitMacros.cmake:
     9        Pass the GPERF_EXECUTABLE that we found to make-hash-tools.pl.
     10
    1112016-01-23  Aaron Chu  <arona.chu@gmail.com>
    212
  • trunk/Source/WebCore/CMakeLists.txt

    r195551 r195582  
    34883488    DEPENDS ${WEBCORE_DIR}/platform/network/create-http-header-name-table
    34893489    WORKING_DIRECTORY ${DERIVED_SOURCES_WEBCORE_DIR}
    3490     COMMAND ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/platform/network/create-http-header-name-table ${WEBCORE_DIR}/platform/network/HTTPHeaderNames.in
     3490    COMMAND ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/platform/network/create-http-header-name-table ${WEBCORE_DIR}/platform/network/HTTPHeaderNames.in "${GPERF_EXECUTABLE}"
    34913491    VERBATIM)
    34923492list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/HTTPHeaderNames.cpp)
     
    34993499    WORKING_DIRECTORY ${DERIVED_SOURCES_WEBCORE_DIR}
    35003500    COMMAND ${PERL_EXECUTABLE} -ne "print" ${WebCore_CSS_PROPERTY_NAMES} > ${DERIVED_SOURCES_WEBCORE_DIR}/CSSPropertyNames.in
    3501     COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${WEBCORE_DIR}/css/makeprop.pl --defines "${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}" --preprocessor "${CODE_GENERATOR_PREPROCESSOR}"
     3501    COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${WEBCORE_DIR}/css/makeprop.pl --defines "${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}" --preprocessor "${CODE_GENERATOR_PREPROCESSOR}" --gperf-executable "${GPERF_EXECUTABLE}"
    35023502    VERBATIM)
    35033503list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/CSSPropertyNames.cpp)
     
    35273527    MAIN_DEPENDENCY ${WEBCORE_DIR}/css/makeSelectorPseudoClassAndCompatibilityElementMap.py
    35283528    WORKING_DIRECTORY ${DERIVED_SOURCES_WEBCORE_DIR}
    3529     COMMAND ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/css/makeSelectorPseudoClassAndCompatibilityElementMap.py ${WEBCORE_DIR}/css/SelectorPseudoClassAndCompatibilityElementMap.in "${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}"
     3529    COMMAND ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/css/makeSelectorPseudoClassAndCompatibilityElementMap.py ${WEBCORE_DIR}/css/SelectorPseudoClassAndCompatibilityElementMap.in "${GPERF_EXECUTABLE}" "${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}"
    35303530    VERBATIM)
    35313531list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/SelectorPseudoClassAndCompatibilityElementMap.cpp)
     
    35343534    MAIN_DEPENDENCY ${WEBCORE_DIR}/css/makeSelectorPseudoElementsMap.py
    35353535    WORKING_DIRECTORY ${DERIVED_SOURCES_WEBCORE_DIR}
    3536     COMMAND ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/css/makeSelectorPseudoElementsMap.py ${WEBCORE_DIR}/css/SelectorPseudoElementTypeMap.in "${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}"
     3536    COMMAND ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/css/makeSelectorPseudoElementsMap.py ${WEBCORE_DIR}/css/SelectorPseudoElementTypeMap.in "${GPERF_EXECUTABLE}" "${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}"
    35373537    VERBATIM)
    35383538list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/SelectorPseudoElementTypeMap.cpp)
  • trunk/Source/WebCore/ChangeLog

    r195580 r195582  
     12016-01-25  Alex Christensen  <achristensen@webkit.org>
     2
     3        Fix internal Windows build
     4        https://bugs.webkit.org/show_bug.cgi?id=153469
     5
     6        Reviewed by Brent Fulgham.
     7
     8        * CMakeLists.txt:
     9        Pass the GPERF_EXECUTABLE that we found to perl scripts so they can use it instead of just calling gperf.
     10        This is needed for builds where gperf is not in the PATH.
     11        * DerivedSources.make:
     12        Pass "gperf" as the gperf command to retain existing functionality on mac.
     13        * bindings/scripts/preprocess-idls.pl:
     14        (CygwinPathIfNeeded):
     15        * bindings/scripts/preprocessor.pm:
     16        (applyPreprocessor):
     17        Add /cygdrive/c/cygwin/bin to the PATH before calling cygpath.
     18        This is needed for builds where we are using cygwin, but C:/cygwin/bin is not in the PATH.
     19        * css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
     20        * css/makeSelectorPseudoElementsMap.py:
     21        * css/makeprop.pl:
     22        * platform/network/create-http-header-name-table:
     23        Use the gperf executable passed in as a command line parameter if it is given.
     24
    1252016-01-25  Simon Fraser  <simon.fraser@apple.com>
    226
  • trunk/Source/WebCore/DerivedSources.make

    r195530 r195582  
    886886# CSS Selector pseudo type name to value map.
    887887
    888 WEBCORE_CSS_SELECTOR_PSEUDO_TYPE_MAP_KEYWORDS := $(WebCore)/css/SelectorPseudoClassAndCompatibilityElementMap.in
    889 SelectorPseudoClassAndCompatibilityElementMap.cpp : $(WebCore)/css/makeSelectorPseudoClassAndCompatibilityElementMap.py $(WEBCORE_CSS_SELECTOR_PSEUDO_TYPE_MAP_KEYWORDS)
    890         $(PYTHON) "$(WebCore)/css/makeSelectorPseudoClassAndCompatibilityElementMap.py" $(WEBCORE_CSS_SELECTOR_PSEUDO_TYPE_MAP_KEYWORDS) "$(FEATURE_DEFINES)"
    891 
    892 WEBCORE_CSS_SELECTOR_PSEUDO_ELEMENTS_TYPE_MAP_KEYWORDS := $(WebCore)/css/SelectorPseudoElementTypeMap.in
    893 SelectorPseudoElementTypeMap.cpp : $(WebCore)/css/makeSelectorPseudoElementsMap.py $(WEBCORE_CSS_SELECTOR_PSEUDO_ELEMENTS_TYPE_MAP_KEYWORDS)
    894         $(PYTHON) "$(WebCore)/css/makeSelectorPseudoElementsMap.py" $(WEBCORE_CSS_SELECTOR_PSEUDO_ELEMENTS_TYPE_MAP_KEYWORDS) "$(FEATURE_DEFINES)"
     888SelectorPseudoClassAndCompatibilityElementMap.cpp : $(WebCore)/css/makeSelectorPseudoClassAndCompatibilityElementMap.py $(WebCore)/css/SelectorPseudoClassAndCompatibilityElementMap.in
     889        $(PYTHON) "$(WebCore)/css/makeSelectorPseudoClassAndCompatibilityElementMap.py" $(WebCore)/css/SelectorPseudoClassAndCompatibilityElementMap.in gperf "$(FEATURE_DEFINES)"
     890
     891SelectorPseudoElementTypeMap.cpp : $(WebCore)/css/makeSelectorPseudoElementsMap.py $(WebCore)/css/SelectorPseudoElementTypeMap.in
     892        $(PYTHON) "$(WebCore)/css/makeSelectorPseudoElementsMap.py" $(WebCore)/css/SelectorPseudoElementTypeMap.in gperf "$(FEATURE_DEFINES)"
    895893
    896894# --------
     
    928926
    929927HTTPHeaderNames.h : platform/network/HTTPHeaderNames.in $(WebCore)/platform/network/create-http-header-name-table
    930         $(PYTHON) $(WebCore)/platform/network/create-http-header-name-table $(WebCore)/platform/network/HTTPHeaderNames.in
     928        $(PYTHON) $(WebCore)/platform/network/create-http-header-name-table $(WebCore)/platform/network/HTTPHeaderNames.in gperf
    931929
    932930# --------
  • trunk/Source/WebCore/bindings/scripts/preprocess-idls.pl

    r189934 r195582  
    176176}
    177177
     178my $cygwinPathAdded;
    178179sub CygwinPathIfNeeded
    179180{
    180181    my $path = shift;
    181182    if ($path && $Config{osname} eq "cygwin") {
     183        if (not $cygwinPathAdded) {
     184            $ENV{PATH} = "$ENV{PATH}:/cygdrive/c/cygwin/bin";
     185            $cygwinPathAdded = 1;
     186        }
    182187        chomp($path = `cygpath -u '$path'`);
    183188        $path =~ s/[\r\n]//;
  • trunk/Source/WebCore/bindings/scripts/preprocessor.pm

    r189985 r195582  
    7777    my $pid = 0;
    7878    if ($Config{osname} eq "cygwin") {
     79        $ENV{PATH} = "$ENV{PATH}:/cygdrive/c/cygwin/bin";
    7980        my @preprocessorAndFlags;
    8081        if ($preprocessor eq "/usr/bin/gcc") {
  • trunk/Source/WebCore/css/makeSelectorPseudoClassAndCompatibilityElementMap.py

    r195452 r195582  
    208208output_file.close()
    209209
    210 gperf_command = 'gperf'
     210gperf_command = sys.argv[2]
    211211if 'GPERF' in os.environ:
    212212    gperf_command = os.environ['GPERF']
  • trunk/Source/WebCore/css/makeSelectorPseudoElementsMap.py

    r172093 r195582  
    203203output_file.close()
    204204
    205 gperf_command = 'gperf'
     205gperf_command = sys.argv[2]
    206206if 'GPERF' in os.environ:
    207207    gperf_command = os.environ['GPERF']
  • trunk/Source/WebCore/css/makeprop.pl

    r191178 r195582  
    3030my $defines;
    3131my $preprocessor;
     32my $gperf;
    3233GetOptions('defines=s' => \$defines,
    33            'preprocessor=s' => \$preprocessor);
     34           'preprocessor=s' => \$preprocessor,
     35           'gperf-executable=s' => \$gperf);
    3436
    3537my @NAMES = applyPreprocessor("CSSPropertyNames.in", $defines, $preprocessor);
     
    10471049close SHORTHANDS_CPP;
    10481050
    1049 my $gperf = $ENV{GPERF} ? $ENV{GPERF} : "gperf";
     1051if (not $gperf) {
     1052    $gperf = $ENV{GPERF} ? $ENV{GPERF} : "gperf";
     1053}
    10501054system("\"$gperf\" --key-positions=\"*\" -D -n -s 2 CSSPropertyNames.gperf --output-file=CSSPropertyNames.cpp") == 0 || die "calling gperf failed: $?";
  • trunk/Source/WebCore/platform/network/create-http-header-name-table

    r179861 r195582  
    3333program_name = os.path.basename(__file__)
    3434if len(sys.argv) < 2:
    35     sys.stderr.write("Usage: %s INPUT_FILE\n" % program_name)
     35    sys.stderr.write("Usage: %s INPUT_FILE GPERF_EXECUTABLE\n" % program_name)
    3636    exit(1)
    3737
     
    239239header_file.close()
    240240
    241 gperf = os.getenv('GPERF') or 'gperf'
     241gperf = os.getenv('GPERF') or sys.argv[2]
    242242
    243243if os.system('%s --key-positions="*" -D -n -s 2 HTTPHeaderNames.gperf --output-file=HTTPHeaderNames.cpp' % gperf):
  • trunk/Source/cmake/WebKitMacros.cmake

    r192312 r195582  
    222222        OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/${_name}.cpp ${_hash_tools_h}
    223223        MAIN_DEPENDENCY ${_source}.gperf
    224         COMMAND ${PERL_EXECUTABLE} ${WEBCORE_DIR}/make-hash-tools.pl ${DERIVED_SOURCES_WEBCORE_DIR} ${_source}.gperf
     224        COMMAND ${PERL_EXECUTABLE} ${WEBCORE_DIR}/make-hash-tools.pl ${DERIVED_SOURCES_WEBCORE_DIR} ${_source}.gperf ${GPERF_EXECUTABLE}
    225225        VERBATIM)
    226226
Note: See TracChangeset for help on using the changeset viewer.