Title: [219728] trunk/Tools
Revision
219728
Author
[email protected]
Date
2017-07-21 09:02:22 -0700 (Fri, 21 Jul 2017)

Log Message

[CMake] Add an option to stop build after generating project files
https://bugs.webkit.org/show_bug.cgi?id=174664

Patch by Yousuke Kimoto <[email protected]> on 2017-07-21
Reviewed by Konstantin Tokarev.

Add "--generate-project-only" to stop build after generating project files.

* Scripts/build-webkit: Add '--generate-project-only' option and a checker to stop build.
* Scripts/webkitdirs.pm: Add a function to check '--generate-project-only' option and the same checker as the above
(buildCMakeProjectOrExit): Add a cheker to stop build stop build after generating project files.
(determineIsGenerateProjectOnly): Check if '--generate-project-only' option is specified
(isGenerateProjectOnly): ditto

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (219727 => 219728)


--- trunk/Tools/ChangeLog	2017-07-21 16:01:01 UTC (rev 219727)
+++ trunk/Tools/ChangeLog	2017-07-21 16:02:22 UTC (rev 219728)
@@ -1,3 +1,18 @@
+2017-07-21  Yousuke Kimoto  <[email protected]>
+
+        [CMake] Add an option to stop build after generating project files
+        https://bugs.webkit.org/show_bug.cgi?id=174664
+
+        Reviewed by Konstantin Tokarev.
+
+        Add "--generate-project-only" to stop build after generating project files.
+
+        * Scripts/build-webkit: Add '--generate-project-only' option and a checker to stop build.
+        * Scripts/webkitdirs.pm: Add a function to check '--generate-project-only' option and the same checker as the above
+        (buildCMakeProjectOrExit): Add a cheker to stop build stop build after generating project files.
+        (determineIsGenerateProjectOnly): Check if '--generate-project-only' option is specified
+        (isGenerateProjectOnly): ditto
+
 2017-07-21  Yusuke Suzuki  <[email protected]>
 
         [WTF] Newly added AtomicStringImpl should use BufferInternal static string if StringImpl is static

Modified: trunk/Tools/Scripts/build-webkit (219727 => 219728)


--- trunk/Tools/Scripts/build-webkit	2017-07-21 16:01:01 UTC (rev 219727)
+++ trunk/Tools/Scripts/build-webkit	2017-07-21 16:02:22 UTC (rev 219728)
@@ -89,6 +89,7 @@
 Usage: $programName [options] [options to pass to build system]
   --help                            Show this help message
   --clean                           Cleanup the build directory
+  --generate-project-only           Only generate project files
   --debug                           Compile with Debug configuration
   --release                         Compile with Release configuration
   --sdk=<sdk>                       Use a specific Xcode SDK (iOS and Mac only)
@@ -261,6 +262,9 @@
     if (exitStatus(generateBuildSystemFromCMakeProject($prefixPath, @cmakeArgs))) {
         die "Run \"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/vcvarsall.bat\" before build-webkit when using ninja";
     }
+
+    exit 0 if isGenerateProjectOnly();
+
     chdirWebKit();
     if (canUseNinja()) {
         chdir File::Spec->catdir($baseProductDir, configuration());
@@ -278,6 +282,8 @@
         exit exitStatus($result);
     }
 } elsif (isAppleCocoaWebKit() && !isCMakeBuild()) {
+    exit 0 if isGenerateProjectOnly();
+
     # Build, and abort if the build fails.
     for my $dir (@projects) {
         chdir $dir or die;

Modified: trunk/Tools/Scripts/webkitdirs.pm (219727 => 219728)


--- trunk/Tools/Scripts/webkitdirs.pm	2017-07-21 16:01:01 UTC (rev 219727)
+++ trunk/Tools/Scripts/webkitdirs.pm	2017-07-21 16:02:22 UTC (rev 219728)
@@ -139,6 +139,7 @@
 my $iosVersion;
 my $generateDsym;
 my $isCMakeBuild;
+my $isGenerateProjectOnly;
 my $isWin64;
 my $isInspectorFrontend;
 my $portName;
@@ -2135,6 +2136,7 @@
 
     $returnCode = exitStatus(generateBuildSystemFromCMakeProject($prefixPath, @cmakeArgs));
     exit($returnCode) if $returnCode;
+    exit 0 if isGenerateProjectOnly();
 
     $returnCode = exitStatus(buildCMakeGeneratedProject($makeArgs));
     exit($returnCode) if $returnCode;
@@ -2164,6 +2166,18 @@
     return $isCMakeBuild;
 }
 
+sub determineIsGenerateProjectOnly()
+{
+    return if defined($isGenerateProjectOnly);
+    $isGenerateProjectOnly = checkForArgumentAndRemoveFromARGV("--generate-project-only");
+}
+
+sub isGenerateProjectOnly()
+{
+    determineIsGenerateProjectOnly();
+    return $isGenerateProjectOnly;
+}
+
 sub promptUser
 {
     my ($prompt, $default) = @_;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to