Move scripts for Derived and Unified Sources to external files
authorkrollin@apple.com <krollin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Nov 2018 06:01:15 +0000 (06:01 +0000)
committerkrollin@apple.com <krollin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Nov 2018 06:01:15 +0000 (06:01 +0000)
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/JavaScriptCore:

* JavaScriptCore.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:

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

17 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/Scripts/generate-derived-sources.sh [new file with mode: 0755]
Source/JavaScriptCore/Scripts/generate-unified-sources.sh [new file with mode: 0755]
Source/WebCore/ChangeLog
Source/WebCore/Scripts/generate-derived-sources.sh [new file with mode: 0755]
Source/WebCore/Scripts/generate-unified-sources.sh [new file with mode: 0755]
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebKit/ChangeLog
Source/WebKit/Scripts/generate-derived-sources.sh [new file with mode: 0755]
Source/WebKit/Scripts/generate-unified-sources.sh [new file with mode: 0755]
Source/WebKit/WebKit.xcodeproj/project.pbxproj
Tools/ChangeLog
Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj
Tools/DumpRenderTree/Scripts/generate-derived-sources.sh [new file with mode: 0755]
Tools/WebKitTestRunner/Scripts/generate-derived-sources.sh [new file with mode: 0755]
Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj

index a6b6883..c89824e 100644 (file)
@@ -1,3 +1,25 @@
+2018-11-14  Keith Rollin  <krollin@apple.com>
+
+        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.
+
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+        * Scripts/generate-derived-sources.sh: Added.
+        * Scripts/generate-unified-sources.sh: Added.
+
 2018-11-14  Joseph Pecoraro  <pecoraro@apple.com>
 
         Web Inspector: Pass Inspector::FrontendChannel as a reference connect/disconnect methods
index 17d41d1..ee45711 100644 (file)
                        );
                        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/JavaScriptCore\" \"--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;
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                        shellPath = /bin/sh;
-                       shellScript = "set -e\n\nmkdir -p \"${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore\"\ncd \"${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore\"\n\n/bin/ln -sfh \"${SRCROOT}\" JavaScriptCore\nexport JavaScriptCore=\"JavaScriptCore\"\nexport BUILT_PRODUCTS_DIR=\"../..\"\n\nmake --no-builtin-rules -f \"JavaScriptCore/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;
diff --git a/Source/JavaScriptCore/Scripts/generate-derived-sources.sh b/Source/JavaScriptCore/Scripts/generate-derived-sources.sh
new file mode 100755 (executable)
index 0000000..7627795
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+
+mkdir -p "${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore"
+cd "${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore"
+
+/bin/ln -sfh "${SRCROOT}" JavaScriptCore
+export JavaScriptCore="JavaScriptCore"
+export BUILT_PRODUCTS_DIR="../.."
+
+make --no-builtin-rules -f "JavaScriptCore/DerivedSources.make" -j `/usr/sbin/sysctl -n hw.ncpu`
diff --git a/Source/JavaScriptCore/Scripts/generate-unified-sources.sh b/Source/JavaScriptCore/Scripts/generate-unified-sources.sh
new file mode 100755 (executable)
index 0000000..5338689
--- /dev/null
@@ -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/JavaScriptCore" "--source-tree-path" "${SRCROOT}" "--max-cpp-bundle-count" "${UnifiedSourceCppFileCount}" "--max-obj-c-bundle-count" "${UnifiedSourceMmFileCount}" "Sources.txt" "SourcesCocoa.txt" > /dev/null
index 04c2db9..1b988b2 100644 (file)
@@ -1,5 +1,29 @@
 2018-11-14  Keith Rollin  <krollin@apple.com>
 
+        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  <krollin@apple.com>
+
         Fix #end vs. #endif typo.
         https://bugs.webkit.org/show_bug.cgi?id=191668
         <rdar://problem/46081704>
diff --git a/Source/WebCore/Scripts/generate-derived-sources.sh b/Source/WebCore/Scripts/generate-derived-sources.sh
new file mode 100755 (executable)
index 0000000..d906d0a
--- /dev/null
@@ -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 "${JAVASCRIPTCORE_PRIVATE_HEADERS_DIR}" JavaScriptCorePrivateHeaders
+export JavaScriptCore_SCRIPTS_DIR="JavaScriptCorePrivateHeaders"
+
+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
diff --git a/Source/WebCore/Scripts/generate-unified-sources.sh b/Source/WebCore/Scripts/generate-unified-sources.sh
new file mode 100755 (executable)
index 0000000..a468120
--- /dev/null
@@ -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
index f69720a..ff6e664 100644 (file)
                        );
                        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;
                        );
                        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 \"${JAVASCRIPTCORE_PRIVATE_HEADERS_DIR}\" JavaScriptCorePrivateHeaders\nexport JavaScriptCore_SCRIPTS_DIR=\"JavaScriptCorePrivateHeaders\"\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 */
 
index f03b126..4602b90 100644 (file)
@@ -1,3 +1,25 @@
+2018-11-14  Keith Rollin  <krollin@apple.com>
+
+        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  <cdumez@apple.com>
 
         WebKit.DecidePolicyForNavigationActionForHyperlinkThatRedirects API fails when PSON is enabled
diff --git a/Source/WebKit/Scripts/generate-derived-sources.sh b/Source/WebKit/Scripts/generate-derived-sources.sh
new file mode 100755 (executable)
index 0000000..31d2cbf
--- /dev/null
@@ -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 "${JAVASCRIPTCORE_PRIVATE_HEADERS_DIR}" JavaScriptCorePrivateHeaders
+export JavaScriptCore_SCRIPTS_DIR="JavaScriptCorePrivateHeaders"
+
+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
diff --git a/Source/WebKit/Scripts/generate-unified-sources.sh b/Source/WebKit/Scripts/generate-unified-sources.sh
new file mode 100755 (executable)
index 0000000..4427699
--- /dev/null
@@ -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
index be40dbd..96c6241 100644 (file)
                        );
                        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;
                        );
                        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 \"${JAVASCRIPTCORE_PRIVATE_HEADERS_DIR}\" JavaScriptCorePrivateHeaders\nexport JavaScriptCore_SCRIPTS_DIR=\"JavaScriptCorePrivateHeaders\"\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.activecpu` SDKROOT=${SDKROOT}\nfi\n";
+                       shellScript = "Scripts/generate-derived-sources.sh\n";
                };
                E1AC2E2C20F7B95800B0897D /* Unlock Keychain */ = {
                        isa = PBXShellScriptBuildPhase;
index 89d2ed5..e83e634 100644 (file)
@@ -1,3 +1,26 @@
+2018-11-14  Keith Rollin  <krollin@apple.com>
+
+        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  <cdumez@apple.com>
 
         WebKit.DecidePolicyForNavigationActionForHyperlinkThatRedirects API fails when PSON is enabled
index a62fa65..573aeee 100644 (file)
                        );
                        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 */
 
diff --git a/Tools/DumpRenderTree/Scripts/generate-derived-sources.sh b/Tools/DumpRenderTree/Scripts/generate-derived-sources.sh
new file mode 100755 (executable)
index 0000000..ccf7a21
--- /dev/null
@@ -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
diff --git a/Tools/WebKitTestRunner/Scripts/generate-derived-sources.sh b/Tools/WebKitTestRunner/Scripts/generate-derived-sources.sh
new file mode 100755 (executable)
index 0000000..0cabc7e
--- /dev/null
@@ -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
index eab6e28..64d6a02 100644 (file)
                        );
                        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 */