[CMake] gperf path should be given when WebCore/css/makevalues.pl is executed
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Apr 2018 18:14:43 +0000 (18:14 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Apr 2018 18:14:43 +0000 (18:14 +0000)
https://bugs.webkit.org/show_bug.cgi?id=184224

Patch by Yousuke Kimoto <yousuke.kimoto@sony.com> on 2018-04-03
Reviewed by Konstantin Tokarev.

When a building evironment doens't include a path to gperf,
WebCore/css/makevalue.pl failes due to failing to execute gperf,
so the full path to gperf should be given like WebCore/css/makeprop.pl.

No new tests, no Web-facing behavior change.

* CMakeLists.txt: gperf path is given to css/makevalues.pl.
* css/makevalues.pl: Add an argument to handle a given gperf path.

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

Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/css/makevalues.pl

index 2befcc4..0d1ee7f 100644 (file)
@@ -1726,7 +1726,7 @@ add_custom_command(
     DEPENDS ${WebCore_CSS_VALUE_KEYWORDS}
     WORKING_DIRECTORY ${DERIVED_SOURCES_WEBCORE_DIR}
     COMMAND ${PERL_EXECUTABLE} -ne "print" ${WebCore_CSS_VALUE_KEYWORDS} > ${DERIVED_SOURCES_WEBCORE_DIR}/CSSValueKeywords.in
-    COMMAND ${PERL_EXECUTABLE} ${WEBCORE_DIR}/css/makevalues.pl --defines "${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}" --preprocessor "${CODE_GENERATOR_PREPROCESSOR}"
+    COMMAND ${PERL_EXECUTABLE} ${WEBCORE_DIR}/css/makevalues.pl --defines "${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}" --preprocessor "${CODE_GENERATOR_PREPROCESSOR}" --gperf-executable "${GPERF_EXECUTABLE}"
     VERBATIM)
 list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/CSSValueKeywords.cpp)
 ADD_SOURCE_WEBCORE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/css/CSSParser.cpp CSSValueKeywords.h)
index 6f54dbc..595dda2 100644 (file)
@@ -1,3 +1,19 @@
+2018-04-03  Yousuke Kimoto  <yousuke.kimoto@sony.com>
+
+        [CMake] gperf path should be given when WebCore/css/makevalues.pl is executed
+        https://bugs.webkit.org/show_bug.cgi?id=184224
+
+        Reviewed by Konstantin Tokarev.
+
+        When a building evironment doens't include a path to gperf,
+        WebCore/css/makevalue.pl failes due to failing to execute gperf,
+        so the full path to gperf should be given like WebCore/css/makeprop.pl.
+
+        No new tests, no Web-facing behavior change.
+
+        * CMakeLists.txt: gperf path is given to css/makevalues.pl.
+        * css/makevalues.pl: Add an argument to handle a given gperf path.
+
 2018-04-03  Chris Dumez  <cdumez@apple.com>
 
         Drop MainFrame class
index b1b144f..55c4e75 100755 (executable)
@@ -31,8 +31,10 @@ use warnings;
 
 my $defines;
 my $preprocessor;
+my $gperf;
 GetOptions('defines=s' => \$defines,
-           'preprocessor=s' => \$preprocessor);
+           'preprocessor=s' => \$preprocessor,
+           'gperf-executable=s' => \$gperf);
 
 my @NAMES = applyPreprocessor("CSSValueKeywords.in", $defines, $preprocessor);
 
@@ -172,5 +174,7 @@ const char* getValueName(unsigned short id);
 EOF
 close HEADER;
 
-my $gperf = $ENV{GPERF} ? $ENV{GPERF} : "gperf";
+if (not $gperf) {
+    $gperf = $ENV{GPERF} ? $ENV{GPERF} : "gperf";
+}
 system("\"$gperf\" --key-positions=\"*\" -D -n -s 2 CSSValueKeywords.gperf --output-file=CSSValueKeywords.cpp") == 0 || die "calling gperf failed: $?";