Title: [238219] trunk
Revision
238219
Author
[email protected]
Date
2018-11-14 22:01:15 -0800 (Wed, 14 Nov 2018)

Log Message

Move scripts for Derived and Unified Sources to external files
https://bugs.webkit.org/show_bug.cgi?id=191670
<rdar://problem/46082278>

Reviewed by Keith Miller.

Move the scripts in the Generate Derived Sources and Generate Unified
Sources Run Script phases from the Xcode projects to external shell
script files. Then invoke those scripts from the Run Script phases.
This refactoring is being performed to support later work that will
invoke these scripts in other contexts.

The scripts were maintained as-is when making the move. I did a little
reformatting and added 'set -e' to the top of each file, but that's
it.

Source/_javascript_Core:

* _javascript_Core.xcodeproj/project.pbxproj:
* Scripts/generate-derived-sources.sh: Added.
* Scripts/generate-unified-sources.sh: Added.

Source/WebCore:

No new tests -- no changed functionality.

* Scripts/generate-derived-sources.sh: Added.
* Scripts/generate-unified-sources.sh: Added.
* WebCore.xcodeproj/project.pbxproj:

Source/WebKit:

* Scripts/generate-derived-sources.sh: Added.
* Scripts/generate-unified-sources.sh: Added.
* WebKit.xcodeproj/project.pbxproj:

Tools:

* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
* DumpRenderTree/Scripts/generate-derived-sources.sh: Added.
* WebKitTestRunner/Scripts/generate-derived-sources.sh: Added.
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:

Modified Paths

Added Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (238218 => 238219)


--- trunk/Source/_javascript_Core/ChangeLog	2018-11-15 03:35:37 UTC (rev 238218)
+++ trunk/Source/_javascript_Core/ChangeLog	2018-11-15 06:01:15 UTC (rev 238219)
@@ -1,3 +1,25 @@
+2018-11-14  Keith Rollin  <[email protected]>
+
+        Move scripts for Derived and Unified Sources to external files
+        https://bugs.webkit.org/show_bug.cgi?id=191670
+        <rdar://problem/46082278>
+
+        Reviewed by Keith Miller.
+
+        Move the scripts in the Generate Derived Sources and Generate Unified
+        Sources Run Script phases from the Xcode projects to external shell
+        script files. Then invoke those scripts from the Run Script phases.
+        This refactoring is being performed to support later work that will
+        invoke these scripts in other contexts.
+
+        The scripts were maintained as-is when making the move. I did a little
+        reformatting and added 'set -e' to the top of each file, but that's
+        it.
+
+        * _javascript_Core.xcodeproj/project.pbxproj:
+        * Scripts/generate-derived-sources.sh: Added.
+        * Scripts/generate-unified-sources.sh: Added.
+
 2018-11-14  Joseph Pecoraro  <[email protected]>
 
         Web Inspector: Pass Inspector::FrontendChannel as a reference connect/disconnect methods

Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (238218 => 238219)


--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2018-11-15 03:35:37 UTC (rev 238218)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2018-11-15 06:01:15 UTC (rev 238219)
@@ -10178,7 +10178,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "set -e\n\ncd $SRCROOT\n\nif [ \"${DEPLOYMENT_LOCATION}\" == \"YES\" ]; then\n    BUILD_SCRIPTS_DIR=\"${SDKROOT}${WK_ALTERNATE_WEBKIT_SDK_PATH}/usr/local/include/wtf/Scripts\"\nelse\n    BUILD_SCRIPTS_DIR=\"${BUILT_PRODUCTS_DIR}/usr/local/include/wtf/Scripts\"\nfi\n\nUnifiedSourceCppFileCount=145\nUnifiedSourceMmFileCount=5\n\n/usr/bin/env ruby \"${BUILD_SCRIPTS_DIR}/generate-unified-source-bundles.rb\" \"--derived-sources-path\" \"${BUILT_PRODUCTS_DIR}/DerivedSources/_javascript_Core\" \"--source-tree-path\" \"${SRCROOT}\" \"--max-cpp-bundle-count\" \"${UnifiedSourceCppFileCount}\" \"--max-obj-c-bundle-count\" \"${UnifiedSourceMmFileCount}\" \"Sources.txt\" \"SourcesCocoa.txt\" > /dev/null\n";
+			shellScript = "Scripts/generate-unified-sources.sh\n";
 		};
 		5D29D8BE0E9860B400C3D2D0 /* Check For Weak VTables and Externals */ = {
 			isa = PBXShellScriptBuildPhase;
@@ -10287,7 +10287,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "set -e\n\nmkdir -p \"${BUILT_PRODUCTS_DIR}/DerivedSources/_javascript_Core\"\ncd \"${BUILT_PRODUCTS_DIR}/DerivedSources/_javascript_Core\"\n\n/bin/ln -sfh \"${SRCROOT}\" _javascript_Core\nexport _javascript_Core=\"_javascript_Core\"\nexport BUILT_PRODUCTS_DIR=\"../..\"\n\nmake --no-builtin-rules -f \"_javascript_Core/DerivedSources.make\" -j `/usr/sbin/sysctl -n hw.ncpu`\n";
+			shellScript = "Scripts/generate-derived-sources.sh\n";
 		};
 		A55DEAA416703DF7003DB841 /* Check For Inappropriate Macros in External Headers */ = {
 			isa = PBXShellScriptBuildPhase;

Added: trunk/Source/_javascript_Core/Scripts/generate-derived-sources.sh (0 => 238219)


--- trunk/Source/_javascript_Core/Scripts/generate-derived-sources.sh	                        (rev 0)
+++ trunk/Source/_javascript_Core/Scripts/generate-derived-sources.sh	2018-11-15 06:01:15 UTC (rev 238219)
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+
+mkdir -p "${BUILT_PRODUCTS_DIR}/DerivedSources/_javascript_Core"
+cd "${BUILT_PRODUCTS_DIR}/DerivedSources/_javascript_Core"
+
+/bin/ln -sfh "${SRCROOT}" _javascript_Core
+export _javascript_Core="_javascript_Core"
+export BUILT_PRODUCTS_DIR="../.."
+
+make --no-builtin-rules -f "_javascript_Core/DerivedSources.make" -j `/usr/sbin/sysctl -n hw.ncpu`
Property changes on: trunk/Source/_javascript_Core/Scripts/generate-derived-sources.sh
___________________________________________________________________

Added: svn:executable

+* \ No newline at end of property

Added: trunk/Source/_javascript_Core/Scripts/generate-unified-sources.sh (0 => 238219)


--- trunk/Source/_javascript_Core/Scripts/generate-unified-sources.sh	                        (rev 0)
+++ trunk/Source/_javascript_Core/Scripts/generate-unified-sources.sh	2018-11-15 06:01:15 UTC (rev 238219)
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+set -e
+
+cd $SRCROOT
+
+if [ "${DEPLOYMENT_LOCATION}" == "YES" ]; then
+    BUILD_SCRIPTS_DIR="${SDKROOT}${WK_ALTERNATE_WEBKIT_SDK_PATH}/usr/local/include/wtf/Scripts"
+else
+    BUILD_SCRIPTS_DIR="${BUILT_PRODUCTS_DIR}/usr/local/include/wtf/Scripts"
+fi
+
+UnifiedSourceCppFileCount=145
+UnifiedSourceMmFileCount=5
+
+/usr/bin/env ruby "${BUILD_SCRIPTS_DIR}/generate-unified-source-bundles.rb" "--derived-sources-path" "${BUILT_PRODUCTS_DIR}/DerivedSources/_javascript_Core" "--source-tree-path" "${SRCROOT}" "--max-cpp-bundle-count" "${UnifiedSourceCppFileCount}" "--max-obj-c-bundle-count" "${UnifiedSourceMmFileCount}" "Sources.txt" "SourcesCocoa.txt" > /dev/null
Property changes on: trunk/Source/_javascript_Core/Scripts/generate-unified-sources.sh
___________________________________________________________________

Added: svn:executable

+* \ No newline at end of property

Modified: trunk/Source/WebCore/ChangeLog (238218 => 238219)


--- trunk/Source/WebCore/ChangeLog	2018-11-15 03:35:37 UTC (rev 238218)
+++ trunk/Source/WebCore/ChangeLog	2018-11-15 06:01:15 UTC (rev 238219)
@@ -1,5 +1,29 @@
 2018-11-14  Keith Rollin  <[email protected]>
 
+        Move scripts for Derived and Unified Sources to external files
+        https://bugs.webkit.org/show_bug.cgi?id=191670
+        <rdar://problem/46082278>
+
+        Reviewed by Keith Miller.
+
+        Move the scripts in the Generate Derived Sources and Generate Unified
+        Sources Run Script phases from the Xcode projects to external shell
+        script files. Then invoke those scripts from the Run Script phases.
+        This refactoring is being performed to support later work that will
+        invoke these scripts in other contexts.
+
+        The scripts were maintained as-is when making the move. I did a little
+        reformatting and added 'set -e' to the top of each file, but that's
+        it.
+
+        No new tests -- no changed functionality.
+
+        * Scripts/generate-derived-sources.sh: Added.
+        * Scripts/generate-unified-sources.sh: Added.
+        * WebCore.xcodeproj/project.pbxproj:
+
+2018-11-14  Keith Rollin  <[email protected]>
+
         Fix #end vs. #endif typo.
         https://bugs.webkit.org/show_bug.cgi?id=191668
         <rdar://problem/46081704>

Added: trunk/Source/WebCore/Scripts/generate-derived-sources.sh (0 => 238219)


--- trunk/Source/WebCore/Scripts/generate-derived-sources.sh	                        (rev 0)
+++ trunk/Source/WebCore/Scripts/generate-derived-sources.sh	2018-11-15 06:01:15 UTC (rev 238219)
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+set -e
+
+mkdir -p "${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore"
+cd "${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore"
+
+/bin/ln -sfh "${SRCROOT}" WebCore
+export WebCore="WebCore"
+/bin/ln -sfh "${_javascript_CORE_PRIVATE_HEADERS_DIR}" _javascript_CorePrivateHeaders
+export _javascript_Core_SCRIPTS_DIR="_javascript_CorePrivateHeaders"
+
+if [ ! $CC ]; then
+    export CC="`xcrun -find clang`"
+fi
+
+if [ ! $GPERF ]; then
+    export GPERF="`xcrun -find gperf`"
+fi
+
+MAKEFILE_INCLUDE_FLAGS=$(echo "${WEBKITADDITIONS_HEADER_SEARCH_PATHS}" | perl -e 'print "-I" . join(" -I", split(" ", <>));')
+
+if [ "${ACTION}" = "build" -o "${ACTION}" = "install" -o "${ACTION}" = "installhdrs" -o "${ACTION}" = "installapi" ]; then
+    make --no-builtin-rules ${MAKEFILE_INCLUDE_FLAGS} -f "WebCore/DerivedSources.make" -j `/usr/sbin/sysctl -n hw.activecpu` SDKROOT="${SDKROOT}"
+fi
Property changes on: trunk/Source/WebCore/Scripts/generate-derived-sources.sh
___________________________________________________________________

Added: svn:executable

+* \ No newline at end of property

Added: trunk/Source/WebCore/Scripts/generate-unified-sources.sh (0 => 238219)


--- trunk/Source/WebCore/Scripts/generate-unified-sources.sh	                        (rev 0)
+++ trunk/Source/WebCore/Scripts/generate-unified-sources.sh	2018-11-15 06:01:15 UTC (rev 238219)
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+set -e
+
+cd $SRCROOT
+
+if [ "${DEPLOYMENT_LOCATION}" == "YES" ]; then
+    BUILD_SCRIPTS_DIR="${SDKROOT}${WK_ALTERNATE_WEBKIT_SDK_PATH}/usr/local/include/wtf/Scripts"
+else
+    BUILD_SCRIPTS_DIR="${BUILT_PRODUCTS_DIR}/usr/local/include/wtf/Scripts"
+fi
+
+UnifiedSourceCppFileCount=530
+UnifiedSourceMmFileCount=62
+
+echo "Using unified source list files: Sources.txt, SourcesCocoa.txt"
+
+/usr/bin/env ruby "${BUILD_SCRIPTS_DIR}/generate-unified-source-bundles.rb" "--derived-sources-path" "${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore" "--source-tree-path" "${SRCROOT}" "--feature-flags" "${FEATURE_DEFINES}" "--max-cpp-bundle-count" "${UnifiedSourceCppFileCount}" "--max-obj-c-bundle-count" "${UnifiedSourceMmFileCount}" "Sources.txt" "SourcesCocoa.txt" > /dev/null
Property changes on: trunk/Source/WebCore/Scripts/generate-unified-sources.sh
___________________________________________________________________

Added: svn:executable

+* \ No newline at end of property

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (238218 => 238219)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2018-11-15 03:35:37 UTC (rev 238218)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2018-11-15 06:01:15 UTC (rev 238219)
@@ -32032,7 +32032,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "set -e\n\ncd $SRCROOT\n\nif [ \"${DEPLOYMENT_LOCATION}\" == \"YES\" ]; then\nBUILD_SCRIPTS_DIR=\"${SDKROOT}${WK_ALTERNATE_WEBKIT_SDK_PATH}/usr/local/include/wtf/Scripts\"\nelse\nBUILD_SCRIPTS_DIR=\"${BUILT_PRODUCTS_DIR}/usr/local/include/wtf/Scripts\"\nfi\n\nUnifiedSourceCppFileCount=530\nUnifiedSourceMmFileCount=62\n\necho \"Using unified source list files: Sources.txt, SourcesCocoa.txt\"\n\n/usr/bin/env ruby \"${BUILD_SCRIPTS_DIR}/generate-unified-source-bundles.rb\" \"--derived-sources-path\" \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore\" \"--source-tree-path\" \"${SRCROOT}\" \"--feature-flags\" \"${FEATURE_DEFINES}\" \"--max-cpp-bundle-count\" \"${UnifiedSourceCppFileCount}\" \"--max-obj-c-bundle-count\" \"${UnifiedSourceMmFileCount}\" \"Sources.txt\" \"SourcesCocoa.txt\
 " > /dev/null\n";
+			shellScript = "Scripts/generate-unified-sources.sh\n";
 		};
 		5D0D540D0E9862F60029E223 /* Check For Weak VTables and Externals */ = {
 			isa = PBXShellScriptBuildPhase;
@@ -32136,7 +32136,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "mkdir -p \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore\"\ncd \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore\"\n\n/bin/ln -sfh \"${SRCROOT}\" WebCore\nexport WebCore=\"WebCore\"\n/bin/ln -sfh \"${_javascript_CORE_PRIVATE_HEADERS_DIR}\" _javascript_CorePrivateHeaders\nexport _javascript_Core_SCRIPTS_DIR=\"_javascript_CorePrivateHeaders\"\n\nif [ ! $CC ]; then\n    export CC=\"`xcrun -find clang`\"\nfi\n\nif [ ! $GPERF ]; then\n    export GPERF=\"`xcrun -find gperf`\"\nfi\n\nMAKEFILE_INCLUDE_FLAGS=$(echo \"${WEBKITADDITIONS_HEADER_SEARCH_PATHS}\" | perl -e 'print \"-I\" . join(\" -I\", split(\" \", <>));')\n\nif [ \"${ACTION}\" = \"build\" -o \"${ACTION}\" = \"install\" -o \"${ACTION}\" = \"installhdrs\" -o \"${ACTION}\" = \"installapi\" ]; then\nmake --no
 -builtin-rules ${MAKEFILE_INCLUDE_FLAGS} -f \"WebCore/DerivedSources.make\" -j `/usr/sbin/sysctl -n hw.activecpu` SDKROOT=\"${SDKROOT}\"\nfi\n";
+			shellScript = "Scripts/generate-derived-sources.sh\n";
 		};
 /* End PBXShellScriptBuildPhase section */
 

Modified: trunk/Source/WebKit/ChangeLog (238218 => 238219)


--- trunk/Source/WebKit/ChangeLog	2018-11-15 03:35:37 UTC (rev 238218)
+++ trunk/Source/WebKit/ChangeLog	2018-11-15 06:01:15 UTC (rev 238219)
@@ -1,3 +1,25 @@
+2018-11-14  Keith Rollin  <[email protected]>
+
+        Move scripts for Derived and Unified Sources to external files
+        https://bugs.webkit.org/show_bug.cgi?id=191670
+        <rdar://problem/46082278>
+
+        Reviewed by Keith Miller.
+
+        Move the scripts in the Generate Derived Sources and Generate Unified
+        Sources Run Script phases from the Xcode projects to external shell
+        script files. Then invoke those scripts from the Run Script phases.
+        This refactoring is being performed to support later work that will
+        invoke these scripts in other contexts.
+
+        The scripts were maintained as-is when making the move. I did a little
+        reformatting and added 'set -e' to the top of each file, but that's
+        it.
+
+        * Scripts/generate-derived-sources.sh: Added.
+        * Scripts/generate-unified-sources.sh: Added.
+        * WebKit.xcodeproj/project.pbxproj:
+
 2018-11-14  Chris Dumez  <[email protected]>
 
         WebKit.DecidePolicyForNavigationActionForHyperlinkThatRedirects API fails when PSON is enabled

Added: trunk/Source/WebKit/Scripts/generate-derived-sources.sh (0 => 238219)


--- trunk/Source/WebKit/Scripts/generate-derived-sources.sh	                        (rev 0)
+++ trunk/Source/WebKit/Scripts/generate-derived-sources.sh	2018-11-15 06:01:15 UTC (rev 238219)
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+set -e
+
+mkdir -p "${BUILT_PRODUCTS_DIR}/DerivedSources/WebKit2"
+cd "${BUILT_PRODUCTS_DIR}/DerivedSources/WebKit2"
+
+export WebKit2="${SRCROOT}"
+
+/bin/ln -sfh "${_javascript_CORE_PRIVATE_HEADERS_DIR}" _javascript_CorePrivateHeaders
+export _javascript_Core_SCRIPTS_DIR="_javascript_CorePrivateHeaders"
+
+if [ ! $CC ]; then
+    export CC="`xcrun -find clang`"
+fi
+
+MAKEFILE_INCLUDE_FLAGS=$(echo "${WEBKITADDITIONS_HEADER_SEARCH_PATHS}" | perl -e 'print "-I" . join(" -I", split(" ", <>));')
+
+if [ "${ACTION}" = "build" -o "${ACTION}" = "install" -o "${ACTION}" = "installhdrs" -o "${ACTION}" = "installapi" ]; then
+    make --no-builtin-rules ${MAKEFILE_INCLUDE_FLAGS} -f "${WebKit2}/DerivedSources.make" -j `/usr/sbin/sysctl -n hw.activecpu` SDKROOT=${SDKROOT}
+fi
Property changes on: trunk/Source/WebKit/Scripts/generate-derived-sources.sh
___________________________________________________________________

Added: svn:executable

+* \ No newline at end of property

Added: trunk/Source/WebKit/Scripts/generate-unified-sources.sh (0 => 238219)


--- trunk/Source/WebKit/Scripts/generate-unified-sources.sh	                        (rev 0)
+++ trunk/Source/WebKit/Scripts/generate-unified-sources.sh	2018-11-15 06:01:15 UTC (rev 238219)
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+set -e
+
+cd $SRCROOT
+
+if [ "${DEPLOYMENT_LOCATION}" == "YES" ]; then
+    BUILD_SCRIPTS_DIR="${SDKROOT}${WK_ALTERNATE_WEBKIT_SDK_PATH}/usr/local/include/wtf/Scripts"
+else
+    BUILD_SCRIPTS_DIR="${BUILT_PRODUCTS_DIR}/usr/local/include/wtf/Scripts"
+fi
+
+UnifiedSourceCppFileCount=100
+UnifiedSourceMmFileCount=80
+
+echo "Using unified source list files: Sources.txt, SourcesCocoa.txt"
+
+/usr/bin/env ruby "${BUILD_SCRIPTS_DIR}/generate-unified-source-bundles.rb" "--derived-sources-path" "${BUILT_PRODUCTS_DIR}/DerivedSources/WebKit2" "--source-tree-path" "${SRCROOT}" "--feature-flags" "${FEATURE_DEFINES}" "--max-cpp-bundle-count" "${UnifiedSourceCppFileCount}" "--max-obj-c-bundle-count" "${UnifiedSourceMmFileCount}" "Sources.txt" "SourcesCocoa.txt" > /dev/null
Property changes on: trunk/Source/WebKit/Scripts/generate-unified-sources.sh
___________________________________________________________________

Added: svn:executable

+* \ No newline at end of property

Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (238218 => 238219)


--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2018-11-15 03:35:37 UTC (rev 238218)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2018-11-15 06:01:15 UTC (rev 238219)
@@ -10295,7 +10295,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "set -e\n\ncd $SRCROOT\n\nif [ \"${DEPLOYMENT_LOCATION}\" == \"YES\" ]; then\nBUILD_SCRIPTS_DIR=\"${SDKROOT}${WK_ALTERNATE_WEBKIT_SDK_PATH}/usr/local/include/wtf/Scripts\"\nelse\nBUILD_SCRIPTS_DIR=\"${BUILT_PRODUCTS_DIR}/usr/local/include/wtf/Scripts\"\nfi\n\nUnifiedSourceCppFileCount=100\nUnifiedSourceMmFileCount=80\n\necho \"Using unified source list files: Sources.txt, SourcesCocoa.txt\"\n\n/usr/bin/env ruby \"${BUILD_SCRIPTS_DIR}/generate-unified-source-bundles.rb\" \"--derived-sources-path\" \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKit2\" \"--source-tree-path\" \"${SRCROOT}\" \"--feature-flags\" \"${FEATURE_DEFINES}\" \"--max-cpp-bundle-count\" \"${UnifiedSourceCppFileCount}\" \"--max-obj-c-bundle-count\" \"${UnifiedSourceMmFileCount}\" \"Sources.txt\" \"SourcesCocoa.txt\
 " > /dev/null\n";
+			shellScript = "Scripts/generate-unified-sources.sh\n";
 		};
 		2E16B6F42019BC25008996D6 /* Copy Additional Resources */ = {
 			isa = PBXShellScriptBuildPhase;
@@ -10658,7 +10658,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "mkdir -p \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKit2\"\ncd \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKit2\"\n\nexport WebKit2=\"${SRCROOT}\"\n\n/bin/ln -sfh \"${_javascript_CORE_PRIVATE_HEADERS_DIR}\" _javascript_CorePrivateHeaders\nexport _javascript_Core_SCRIPTS_DIR=\"_javascript_CorePrivateHeaders\"\n\nif [ ! $CC ]; then\n    export CC=\"`xcrun -find clang`\"\nfi\n\nMAKEFILE_INCLUDE_FLAGS=$(echo \"${WEBKITADDITIONS_HEADER_SEARCH_PATHS}\" | perl -e 'print \"-I\" . join(\" -I\", split(\" \", <>));')\n\nif [ \"${ACTION}\" = \"build\" -o \"${ACTION}\" = \"install\" -o \"${ACTION}\" = \"installhdrs\" -o \"${ACTION}\" = \"installapi\" ]; then\n    make --no-builtin-rules ${MAKEFILE_INCLUDE_FLAGS} -f \"${WebKit2}/DerivedSources.make\" -j `/usr/sbin/sysctl -n hw.act
 ivecpu` SDKROOT=${SDKROOT}\nfi\n";
+			shellScript = "Scripts/generate-derived-sources.sh\n";
 		};
 		E1AC2E2C20F7B95800B0897D /* Unlock Keychain */ = {
 			isa = PBXShellScriptBuildPhase;

Modified: trunk/Tools/ChangeLog (238218 => 238219)


--- trunk/Tools/ChangeLog	2018-11-15 03:35:37 UTC (rev 238218)
+++ trunk/Tools/ChangeLog	2018-11-15 06:01:15 UTC (rev 238219)
@@ -1,3 +1,26 @@
+2018-11-14  Keith Rollin  <[email protected]>
+
+        Move scripts for Derived and Unified Sources to external files
+        https://bugs.webkit.org/show_bug.cgi?id=191670
+        <rdar://problem/46082278>
+
+        Reviewed by Keith Miller.
+
+        Move the scripts in the Generate Derived Sources and Generate Unified
+        Sources Run Script phases from the Xcode projects to external shell
+        script files. Then invoke those scripts from the Run Script phases.
+        This refactoring is being performed to support later work that will
+        invoke these scripts in other contexts.
+
+        The scripts were maintained as-is when making the move. I did a little
+        reformatting and added 'set -e' to the top of each file, but that's
+        it.
+
+        * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+        * DumpRenderTree/Scripts/generate-derived-sources.sh: Added.
+        * WebKitTestRunner/Scripts/generate-derived-sources.sh: Added.
+        * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
+
 2018-11-14  Chris Dumez  <[email protected]>
 
         WebKit.DecidePolicyForNavigationActionForHyperlinkThatRedirects API fails when PSON is enabled

Modified: trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj (238218 => 238219)


--- trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj	2018-11-15 03:35:37 UTC (rev 238218)
+++ trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj	2018-11-15 06:01:15 UTC (rev 238219)
@@ -1006,7 +1006,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "mkdir -p \"${BUILT_PRODUCTS_DIR}/DerivedSources/DumpRenderTree\"\ncd \"${BUILT_PRODUCTS_DIR}/DerivedSources/DumpRenderTree\"\n\nexport DumpRenderTree=\"${SRCROOT}\"\nexport WebCoreScripts=\"${WEBCORE_PRIVATE_HEADERS_DIR}\"\n\nif [ ! $CC ]; then\n    export CC=\"`xcrun -find clang`\"\nfi\n\nif [ \"${ACTION}\" = \"build\" -o \"${ACTION}\" = \"install\" -o \"${ACTION}\" = \"installhdrs\" ]; then\n    make -f \"${DumpRenderTree}/DerivedSources.make\" -j `/usr/sbin/sysctl -n hw.activecpu`\nfi\n";
+			shellScript = "Scripts/generate-derived-sources.sh\n";
 		};
 /* End PBXShellScriptBuildPhase section */
 

Added: trunk/Tools/DumpRenderTree/Scripts/generate-derived-sources.sh (0 => 238219)


--- trunk/Tools/DumpRenderTree/Scripts/generate-derived-sources.sh	                        (rev 0)
+++ trunk/Tools/DumpRenderTree/Scripts/generate-derived-sources.sh	2018-11-15 06:01:15 UTC (rev 238219)
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+set -e
+
+mkdir -p "${BUILT_PRODUCTS_DIR}/DerivedSources/DumpRenderTree"
+cd "${BUILT_PRODUCTS_DIR}/DerivedSources/DumpRenderTree"
+
+export DumpRenderTree="${SRCROOT}"
+export WebCoreScripts="${WEBCORE_PRIVATE_HEADERS_DIR}"
+
+if [ ! $CC ]; then
+    export CC="`xcrun -find clang`"
+fi
+
+if [ "${ACTION}" = "build" -o "${ACTION}" = "install" -o "${ACTION}" = "installhdrs" ]; then
+    make -f "${DumpRenderTree}/DerivedSources.make" -j `/usr/sbin/sysctl -n hw.activecpu`
+fi
Property changes on: trunk/Tools/DumpRenderTree/Scripts/generate-derived-sources.sh
___________________________________________________________________

Added: svn:executable

+* \ No newline at end of property

Added: trunk/Tools/WebKitTestRunner/Scripts/generate-derived-sources.sh (0 => 238219)


--- trunk/Tools/WebKitTestRunner/Scripts/generate-derived-sources.sh	                        (rev 0)
+++ trunk/Tools/WebKitTestRunner/Scripts/generate-derived-sources.sh	2018-11-15 06:01:15 UTC (rev 238219)
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+set -e
+
+mkdir -p "${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitTestRunner"
+cd "${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitTestRunner"
+
+export WebKitTestRunner="${SRCROOT}"
+export WebCoreScripts="${WEBCORE_PRIVATE_HEADERS_DIR}"
+
+if [ ! $CC ]; then
+    export CC="`xcrun -find clang`"
+fi
+
+if [ "${ACTION}" = "build" -o "${ACTION}" = "install" -o "${ACTION}" = "installhdrs" ]; then
+    make -f "${WebKitTestRunner}/DerivedSources.make" -j `/usr/sbin/sysctl -n hw.activecpu`
+fi
Property changes on: trunk/Tools/WebKitTestRunner/Scripts/generate-derived-sources.sh
___________________________________________________________________

Added: svn:executable

+* \ No newline at end of property

Modified: trunk/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj (238218 => 238219)


--- trunk/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj	2018-11-15 03:35:37 UTC (rev 238218)
+++ trunk/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj	2018-11-15 06:01:15 UTC (rev 238219)
@@ -1023,7 +1023,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "mkdir -p \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitTestRunner\"\ncd \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitTestRunner\"\n\nexport WebKitTestRunner=\"${SRCROOT}\"\nexport WebCoreScripts=\"${WEBCORE_PRIVATE_HEADERS_DIR}\"\n\nif [ ! $CC ]; then\n    export CC=\"`xcrun -find clang`\"\nfi\n\nif [ \"${ACTION}\" = \"build\" -o \"${ACTION}\" = \"install\" -o \"${ACTION}\" = \"installhdrs\" ]; then\n    make -f \"${WebKitTestRunner}/DerivedSources.make\" -j `/usr/sbin/sysctl -n hw.activecpu`\nfi\n";
+			shellScript = "Scripts/generate-derived-sources.sh\n";
 		};
 /* End PBXShellScriptBuildPhase section */
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to