<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[208220] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/208220">208220</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-11-01 05:20:47 -0700 (Tue, 01 Nov 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>[CMake] generate-bindings-all.pl uses USES_TERMINAL which leaves a noisy line in interactive Ninja build
https://bugs.webkit.org/show_bug.cgi?id=163868
Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2016-11-01
Reviewed by Michael Catanzaro.
It takes long time for generate-bindings-all.pl to generate all
bindings. So, it shows the progress while running and
USES_TERMINAL option of add_custom_target have been used to invoke
the command. However, USES_TERMINAL leaves a noisy line in
Ninja's neat build log of interactive build.
A new CMake option SHOW_BINDINGS_GENERATION_PROGRESS is added to
stop using USES_TERMINAL only in case of interactive Ninja build.
.:
* Source/cmake/WebKitMacros.cmake: Added a new option
SHOW_BINDINGS_GENERATION_PROGRESS. Apended --showProgress switch
of generate-bindings-all.pl and used USES_TERMINAL only if
SHOW_BINDINGS_GENERATION_PROGRESS is enabled.
Source/WebCore:
* bindings/scripts/generate-bindings-all.pl: Added a new switch
--showProgress. Removed $terminalWidth and getTerminalWidth which
are mainly for interactive Ninja build. Added printProgress.
Tools:
* Scripts/webkitdirs.pm:
(generateBuildSystemFromCMakeProject): Enable
SHOW_BINDINGS_GENERATION_PROGRESS not in case of interactive
Ninja build.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkChangeLog">trunk/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsgeneratebindingsallpl">trunk/Source/WebCore/bindings/scripts/generate-bindings-all.pl</a></li>
<li><a href="#trunkSourcecmakeWebKitMacroscmake">trunk/Source/cmake/WebKitMacros.cmake</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsScriptswebkitdirspm">trunk/Tools/Scripts/webkitdirs.pm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/ChangeLog (208219 => 208220)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/ChangeLog        2016-11-01 08:38:36 UTC (rev 208219)
+++ trunk/ChangeLog        2016-11-01 12:20:47 UTC (rev 208220)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2016-11-01 Fujii Hironori <Hironori.Fujii@sony.com>
+
+ [CMake] generate-bindings-all.pl uses USES_TERMINAL which leaves a noisy line in interactive Ninja build
+ https://bugs.webkit.org/show_bug.cgi?id=163868
+
+ Reviewed by Michael Catanzaro.
+
+ It takes long time for generate-bindings-all.pl to generate all
+ bindings. So, it shows the progress while running and
+ USES_TERMINAL option of add_custom_target have been used to invoke
+ the command. However, USES_TERMINAL leaves a noisy line in
+ Ninja's neat build log of interactive build.
+
+ A new CMake option SHOW_BINDINGS_GENERATION_PROGRESS is added to
+ stop using USES_TERMINAL only in case of interactive Ninja build.
+
+ * Source/cmake/WebKitMacros.cmake: Added a new option
+ SHOW_BINDINGS_GENERATION_PROGRESS. Apended --showProgress switch
+ of generate-bindings-all.pl and used USES_TERMINAL only if
+ SHOW_BINDINGS_GENERATION_PROGRESS is enabled.
+
</ins><span class="cx"> 2016-10-31 Ryosuke Niwa <rniwa@webkit.org>
</span><span class="cx">
</span><span class="cx"> Enable custom elements by default everywhere
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (208219 => 208220)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-11-01 08:38:36 UTC (rev 208219)
+++ trunk/Source/WebCore/ChangeLog        2016-11-01 12:20:47 UTC (rev 208220)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2016-11-01 Fujii Hironori <Hironori.Fujii@sony.com>
+
+ [CMake] generate-bindings-all.pl uses USES_TERMINAL which leaves a noisy line in interactive Ninja build
+ https://bugs.webkit.org/show_bug.cgi?id=163868
+
+ Reviewed by Michael Catanzaro.
+
+ It takes long time for generate-bindings-all.pl to generate all
+ bindings. So, it shows the progress while running and
+ USES_TERMINAL option of add_custom_target have been used to invoke
+ the command. However, USES_TERMINAL leaves a noisy line in
+ Ninja's neat build log of interactive build.
+
+ A new CMake option SHOW_BINDINGS_GENERATION_PROGRESS is added to
+ stop using USES_TERMINAL only in case of interactive Ninja build.
+
+ * bindings/scripts/generate-bindings-all.pl: Added a new switch
+ --showProgress. Removed $terminalWidth and getTerminalWidth which
+ are mainly for interactive Ninja build. Added printProgress.
+
</ins><span class="cx"> 2016-11-01 Ryosuke Niwa <rniwa@webkit.org>
</span><span class="cx">
</span><span class="cx"> Web Inspector: Add the support for custom elements
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsgeneratebindingsallpl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/generate-bindings-all.pl (208219 => 208220)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/generate-bindings-all.pl        2016-11-01 08:38:36 UTC (rev 208219)
+++ trunk/Source/WebCore/bindings/scripts/generate-bindings-all.pl        2016-11-01 12:20:47 UTC (rev 208220)
</span><span class="lines">@@ -50,6 +50,7 @@
</span><span class="cx"> my @ppExtraArgs;
</span><span class="cx"> my $numOfJobs = 1;
</span><span class="cx"> my $idlAttributesFile;
</span><ins>+my $showProgress;
</ins><span class="cx">
</span><span class="cx"> GetOptions('include=s@' => \@idlDirectories,
</span><span class="cx"> 'outputDir=s' => \$outputDirectory,
</span><span class="lines">@@ -62,7 +63,8 @@
</span><span class="cx"> 'ppExtraOutput=s@' => \@ppExtraOutput,
</span><span class="cx"> 'ppExtraArgs=s@' => \@ppExtraArgs,
</span><span class="cx"> 'idlAttributesFile=s' => \$idlAttributesFile,
</span><del>- 'numOfJobs=i' => \$numOfJobs);
</del><ins>+ 'numOfJobs=i' => \$numOfJobs,
+ 'showProgress' => \$showProgress);
</ins><span class="cx">
</span><span class="cx"> $| = 1;
</span><span class="cx"> my @idlFiles;
</span><span class="lines">@@ -82,7 +84,7 @@
</span><span class="cx"> '--idlFilesList', $idlFilesList,
</span><span class="cx"> '--supplementalDependencyFile', $supplementalDependencyFile,
</span><span class="cx"> @ppExtraArgs);
</span><del>- print("Preprocess IDL\n");
</del><ins>+ printProgress("Preprocess IDL");
</ins><span class="cx"> executeCommand($perl, @args) == 0 or die;
</span><span class="cx"> }
</span><span class="cx"> readSupplementalDependencyFile($supplementalDependencyFile, \%newSupplements);
</span><span class="lines">@@ -121,7 +123,6 @@
</span><span class="cx"> }}, @idlFiles;
</span><span class="cx"> my $queue = Thread::Queue->new(@idlFilesToUpdate);
</span><span class="cx"> my $abort :shared = 0;
</span><del>-my $terminalWidth = getTerminalWidth();
</del><span class="cx"> my $totalCount = @idlFilesToUpdate;
</span><span class="cx"> my $currentCount :shared = 0;
</span><span class="cx">
</span><span class="lines">@@ -162,12 +163,7 @@
</span><span class="cx"> eval {
</span><span class="cx"> $currentCount++;
</span><span class="cx"> my $basename = basename($file);
</span><del>- if ($terminalWidth) {
- my $w = $terminalWidth - 1;
- print sprintf("%-*.*s\r", $w, $w, "[$currentCount/$totalCount] $basename");
- } else {
- print "[$currentCount/$totalCount] $basename\n";
- }
</del><ins>+ printProgress("[$currentCount/$totalCount] $basename");
</ins><span class="cx"> executeCommand($perl, @args, $file) == 0 or die;
</span><span class="cx"> };
</span><span class="cx"> if ($@) {
</span><span class="lines">@@ -230,13 +226,6 @@
</span><span class="cx"> return $path;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-sub getTerminalWidth
-{
- return 0 unless -t STDOUT;
- return 80 if $^O eq 'MSWin32';
- return `stty size` =~ /\d+\s+(\d+)/ ? $1 : 80;
-}
-
</del><span class="cx"> sub readSupplementalDependencyFile
</span><span class="cx"> {
</span><span class="cx"> my $filename = shift;
</span><span class="lines">@@ -248,3 +237,10 @@
</span><span class="cx"> }
</span><span class="cx"> close($fh) or die;
</span><span class="cx"> }
</span><ins>+
+sub printProgress
+{
+ return unless $showProgress;
+ my $msg = shift;
+ print "$msg\n";
+}
</ins></span></pre></div>
<a id="trunkSourcecmakeWebKitMacroscmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/cmake/WebKitMacros.cmake (208219 => 208220)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/cmake/WebKitMacros.cmake        2016-11-01 08:38:36 UTC (rev 208219)
+++ trunk/Source/cmake/WebKitMacros.cmake        2016-11-01 12:20:47 UTC (rev 208220)
</span><span class="lines">@@ -45,6 +45,8 @@
</span><span class="cx"> #FIXME: Add support for Xcode.
</span><span class="cx"> endmacro()
</span><span class="cx">
</span><ins>+option(SHOW_BINDINGS_GENERATION_PROGRESS "Show progress of generating bindings" OFF)
+
</ins><span class="cx"> # Helper macro which wraps generate-bindings-all.pl script.
</span><span class="cx"> # target is a new target name to be added
</span><span class="cx"> # OUTPUT_SOURCE is a list name which will contain generated sources.(eg. WebCore_SOURCES)
</span><span class="lines">@@ -129,13 +131,16 @@
</span><span class="cx"> endforeach ()
</span><span class="cx"> set(${arg_OUTPUT_SOURCE} ${${arg_OUTPUT_SOURCE}} ${gen_sources} PARENT_SCOPE)
</span><span class="cx"> set(act_args)
</span><ins>+ if (SHOW_BINDINGS_GENERATION_PROGRESS)
+ list(APPEND args --showProgress)
+ endif ()
</ins><span class="cx"> if (${CMAKE_VERSION} VERSION_LESS 3.2)
</span><span class="cx"> set_source_files_properties(${gen_sources} ${gen_headers} PROPERTIES GENERATED 1)
</span><span class="cx"> else ()
</span><del>- list(APPEND act_args
- BYPRODUCTS ${gen_sources} ${gen_headers}
- USES_TERMINAL
- )
</del><ins>+ list(APPEND act_args BYPRODUCTS ${gen_sources} ${gen_headers})
+ if (SHOW_BINDINGS_GENERATION_PROGRESS)
+ list(APPEND act_args USES_TERMINAL)
+ endif ()
</ins><span class="cx"> endif ()
</span><span class="cx"> add_custom_target(${target}
</span><span class="cx"> COMMAND ${PERL_EXECUTABLE} ${binding_generator} ${args}
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (208219 => 208220)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2016-11-01 08:38:36 UTC (rev 208219)
+++ trunk/Tools/ChangeLog        2016-11-01 12:20:47 UTC (rev 208220)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2016-11-01 Fujii Hironori <Hironori.Fujii@sony.com>
+
+ [CMake] generate-bindings-all.pl uses USES_TERMINAL which leaves a noisy line in interactive Ninja build
+ https://bugs.webkit.org/show_bug.cgi?id=163868
+
+ Reviewed by Michael Catanzaro.
+
+ It takes long time for generate-bindings-all.pl to generate all
+ bindings. So, it shows the progress while running and
+ USES_TERMINAL option of add_custom_target have been used to invoke
+ the command. However, USES_TERMINAL leaves a noisy line in
+ Ninja's neat build log of interactive build.
+
+ A new CMake option SHOW_BINDINGS_GENERATION_PROGRESS is added to
+ stop using USES_TERMINAL only in case of interactive Ninja build.
+
+ * Scripts/webkitdirs.pm:
+ (generateBuildSystemFromCMakeProject): Enable
+ SHOW_BINDINGS_GENERATION_PROGRESS not in case of interactive
+ Ninja build.
+
</ins><span class="cx"> 2016-10-31 Simon Fraser <simon.fraser@apple.com>
</span><span class="cx">
</span><span class="cx"> Add basic visual/layout viewport support for fixed position layout
</span></span></pre></div>
<a id="trunkToolsScriptswebkitdirspm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitdirs.pm (208219 => 208220)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitdirs.pm        2016-11-01 08:38:36 UTC (rev 208219)
+++ trunk/Tools/Scripts/webkitdirs.pm        2016-11-01 12:20:47 UTC (rev 208220)
</span><span class="lines">@@ -1964,6 +1964,8 @@
</span><span class="cx"> } elsif (isAnyWindows() && isWin64()) {
</span><span class="cx"> push @args, '-G "Visual Studio 14 2015 Win64"';
</span><span class="cx"> }
</span><ins>+ # Do not show progress of generating bindings in interactive Ninja build not to leave noisy lines on tty
+ push @args, '-DSHOW_BINDINGS_GENERATION_PROGRESS=1' unless ($willUseNinja && -t STDOUT);
</ins><span class="cx">
</span><span class="cx"> # Some ports have production mode, but build-webkit should always use developer mode.
</span><span class="cx"> push @args, "-DDEVELOPER_MODE=ON" if isEfl() || isGtk() || isJSCOnly();
</span></span></pre>
</div>
</div>
</body>
</html>