haikuwebkit/Source/WebCore/Scripts/generate-unified-sources.sh

30 lines
1017 B
Bash
Raw Permalink Normal View History

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/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: Canonical link: https://commits.webkit.org/206421@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-15 06:01:15 +00:00
#!/bin/sh
set -e
Update generate-{derived,unified}-sources scripts to support generating .xcfilelist files https://bugs.webkit.org/show_bug.cgi?id=192031 <rdar://problem/46286816> Reviewed by Alex Christensen. The Generate Derived Sources and Generate Unified Sources build phases in Xcode need to have their inputs and outputs specified. This specification will come in the form of .xcfilelist files that will be attached to these build phases. There is one .xcfilelist file that lists the input file and one that lists the output files. As part of this work, the various generate-{derived,unified}-sources scripts that are executed in these Generate build phases are modified to help in the creation of these .xcfilelist files. In particular, they can now be invoked with command-line parameters. These parameters are then used to alter the normal execution of these scripts, causing them to produce the .xcfilelist files as opposed to actually generating the files that are listed in those files. Source/JavaScriptCore: * Scripts/generate-derived-sources.sh: * Scripts/generate-unified-sources.sh: Source/WebCore: No new tests -- no changed functionality. * Scripts/generate-derived-sources.sh: * Scripts/generate-unified-sources.sh: Source/WebKit: * Scripts/generate-derived-sources.sh: * Scripts/generate-unified-sources.sh: Tools: * DumpRenderTree/Scripts/generate-derived-sources.sh: * WebKitTestRunner/Scripts/generate-derived-sources.sh: Canonical link: https://commits.webkit.org/206792@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238639 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-28 22:09:52 +00:00
ARGS=("$@")
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/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: Canonical link: https://commits.webkit.org/206421@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-15 06:01:15 +00:00
cd $SRCROOT
Update generate-{derived,unified}-sources scripts to support generating .xcfilelist files https://bugs.webkit.org/show_bug.cgi?id=192031 <rdar://problem/46286816> Reviewed by Alex Christensen. The Generate Derived Sources and Generate Unified Sources build phases in Xcode need to have their inputs and outputs specified. This specification will come in the form of .xcfilelist files that will be attached to these build phases. There is one .xcfilelist file that lists the input file and one that lists the output files. As part of this work, the various generate-{derived,unified}-sources scripts that are executed in these Generate build phases are modified to help in the creation of these .xcfilelist files. In particular, they can now be invoked with command-line parameters. These parameters are then used to alter the normal execution of these scripts, causing them to produce the .xcfilelist files as opposed to actually generating the files that are listed in those files. Source/JavaScriptCore: * Scripts/generate-derived-sources.sh: * Scripts/generate-unified-sources.sh: Source/WebCore: No new tests -- no changed functionality. * Scripts/generate-derived-sources.sh: * Scripts/generate-unified-sources.sh: Source/WebKit: * Scripts/generate-derived-sources.sh: * Scripts/generate-unified-sources.sh: Tools: * DumpRenderTree/Scripts/generate-derived-sources.sh: * WebKitTestRunner/Scripts/generate-derived-sources.sh: Canonical link: https://commits.webkit.org/206792@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238639 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-28 22:09:52 +00:00
if [ -z "${BUILD_SCRIPTS_DIR}" ]; then
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
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/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: Canonical link: https://commits.webkit.org/206421@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-15 06:01:15 +00:00
fi
UnifiedSourceCppFileCount=530
UnifiedSourceMmFileCount=62
Update generate-{derived,unified}-sources scripts to support generating .xcfilelist files https://bugs.webkit.org/show_bug.cgi?id=192031 <rdar://problem/46286816> Reviewed by Alex Christensen. The Generate Derived Sources and Generate Unified Sources build phases in Xcode need to have their inputs and outputs specified. This specification will come in the form of .xcfilelist files that will be attached to these build phases. There is one .xcfilelist file that lists the input file and one that lists the output files. As part of this work, the various generate-{derived,unified}-sources scripts that are executed in these Generate build phases are modified to help in the creation of these .xcfilelist files. In particular, they can now be invoked with command-line parameters. These parameters are then used to alter the normal execution of these scripts, causing them to produce the .xcfilelist files as opposed to actually generating the files that are listed in those files. Source/JavaScriptCore: * Scripts/generate-derived-sources.sh: * Scripts/generate-unified-sources.sh: Source/WebCore: No new tests -- no changed functionality. * Scripts/generate-derived-sources.sh: * Scripts/generate-unified-sources.sh: Source/WebKit: * Scripts/generate-derived-sources.sh: * Scripts/generate-unified-sources.sh: Tools: * DumpRenderTree/Scripts/generate-derived-sources.sh: * WebKitTestRunner/Scripts/generate-derived-sources.sh: Canonical link: https://commits.webkit.org/206792@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238639 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-28 22:09:52 +00:00
if [ $# -eq 0 ]; then
echo "Using unified source list files: Sources.txt, SourcesCocoa.txt"
fi
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/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: Canonical link: https://commits.webkit.org/206421@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-15 06:01:15 +00:00
Make generate-unified-sources.sh not depend on features being listed in FEATURE_DEFINES environment variable https://bugs.webkit.org/show_bug.cgi?id=212420 Reviewed by Don Olmstead. .: * Source/cmake/WebKitCommon.cmake: Removed call to SET_CONFIGURATION_FOR_UNIFIED_SOURCE_LISTS. * Source/cmake/WebKitFeatures.cmake: Removed SET_CONFIGURATION_FOR_UNIFIED_SOURCE_LISTS. * Source/cmake/WebKitMacros.cmake: Removed use of "--feature-flags" when invoking the generate-unified-source-bundles.rb, which also means no longer depending on the UNIFIED_SOURCE_LIST_ENABLED_FEATURES variable, which was set by the SET_CONFIGURATION_FOR_UNIFIED_SOURCE_LISTS function. Source/JavaScriptCore: * Scripts/generate-unified-sources.sh: Removed many unneeded quote marks from the invocation of generate-unified-source-bundles.rb. Source/WebCore: * Scripts/generate-unified-sources.sh: Added code to include sources from SourcesCocoaInternalSDK.txt, only if USE_INTERNAL_SDK is YES. Removed --feature-flags argument from invocation of generate-unified-source-bundles.rb. Removed many unnecessary quotes. * SourcesCocoa.txt: Removed the names of the files from the internal SDK. * SourcesCocoaInternalSDK.txt: Added. Moved those names here. * html/MediaElementSession.cpp: Added some includes, apparently needed because of different groupings of unified sources. Source/WebKit: * Scripts/generate-unified-sources.sh: Removed --feature-flags from the arguments passed to generate-unified-source-bundles.rb. Also removed many unneeded quotes. Source/WebKitLegacy: * scripts/generate-unified-sources.sh: Removed --feature-flags from the arguments passed to generate-unified-source-bundles.rb. Also removed many unneeded quotes. Source/WTF: * Scripts/generate-unified-source-bundles.rb: Removed the --feature-flags command line option along with the code that implements it. Canonical link: https://commits.webkit.org/226759@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-04 16:41:45 +00:00
SOURCES="Sources.txt SourcesCocoa.txt"
if [ "${USE_INTERNAL_SDK}" == "YES" ]; then
SOURCES="${SOURCES} SourcesCocoaInternalSDK.txt"
fi
/usr/bin/env ruby "${BUILD_SCRIPTS_DIR}/generate-unified-source-bundles.rb" --derived-sources-path "${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore" --source-tree-path "${SRCROOT}" --max-cpp-bundle-count ${UnifiedSourceCppFileCount} --max-obj-c-bundle-count ${UnifiedSourceMmFileCount} --dense-bundle-filter "JS*" --dense-bundle-filter "bindings/js/*" $SOURCES "${ARGS[@]}" > /dev/null