⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 100197 in webkit


Ignore:
Timestamp:
Nov 14, 2011, 2:47:29 PM (15 years ago)
Author:
mrowe@apple.com
Message:

<rdar://problem/10424154> testRegExp should not be installed as part of JavaScriptCore

testRegExp and testapi.js were being installed in the JavaScriptCore framework.
As test-only tools they shouldn't be installed there by default, only when
FORCE_TOOL_INSTALL is set to YES.

This patch incorprorates a few related changes:
1) Make the jsc and testRegExp targets be configured via .xcconfig files.
2) Sets up testRegExp so that SKIP_INSTALL is YES by default, and only NO when

FORCE_TOOL_INSTALL is YES.

3) Switches the testapi target to using a script build phase to install testapi.js

so that the installation will be skipped when SKIP_INSTALL is YES. I'm not sure
why this isn't the built-in behavior when a Copy Files build phase has "Copy only
when installing" checked, but it doesn't seem to be.

4) Other random cleanup such as removing a bogus group that refers to files that do

not exist, moving testRegExp.cpp in to the tests group, etc.

Reviewed by Geoff Garen.

  • Configurations/JSC.xcconfig: Added.
  • Configurations/TestRegExp.xcconfig: Added.
  • JavaScriptCore.xcodeproj/project.pbxproj:
Location:
trunk/Source/JavaScriptCore
Files:
3 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r100195 r100197  
     12011-11-14  Mark Rowe  <mrowe@apple.com>
     2
     3        <rdar://problem/10424154> testRegExp should not be installed as part of JavaScriptCore
     4
     5        testRegExp and testapi.js were being installed in the JavaScriptCore framework.
     6        As test-only tools they shouldn't be installed there by default, only when
     7        FORCE_TOOL_INSTALL is set to YES.
     8
     9        This patch incorprorates a few related changes:
     10        1) Make the jsc and testRegExp targets be configured via .xcconfig files.
     11        2) Sets up testRegExp so that SKIP_INSTALL is YES by default, and only NO when
     12           FORCE_TOOL_INSTALL is YES.
     13        3) Switches the testapi target to using a script build phase to install testapi.js
     14           so that the installation will be skipped when SKIP_INSTALL is YES. I'm not sure
     15           why this isn't the built-in behavior when a Copy Files build phase has "Copy only
     16           when installing" checked, but it doesn't seem to be.
     17        4) Other random cleanup such as removing a bogus group that refers to files that do
     18           not exist, moving testRegExp.cpp in to the tests group, etc.
     19
     20        Reviewed by Geoff Garen.
     21
     22        * Configurations/JSC.xcconfig: Added.
     23        * Configurations/TestRegExp.xcconfig: Added.
     24        * JavaScriptCore.xcodeproj/project.pbxproj:
     25
    1262011-11-14  Michael Saboff  <msaboff@apple.com>
    227
  • trunk/Source/JavaScriptCore/Configurations/JSC.xcconfig

    r100195 r100197  
    2222// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2323
    24 INSTALL_PATH = $(JAVASCRIPTCORE_FRAMEWORKS_DIR)/JavaScriptCore.framework/Versions/A/Resources
    25 PRODUCT_NAME = testapi;
    26 
    27 SKIP_INSTALL = $(SKIP_INSTALL_$(FORCE_TOOL_INSTALL));
    28 SKIP_INSTALL_ = YES;
    29 SKIP_INSTALL_NO = YES;
    30 SKIP_INSTALL_YES = NO;
     24INSTALL_PATH = $(JAVASCRIPTCORE_FRAMEWORKS_DIR)/JavaScriptCore.framework/Resources
     25PRODUCT_NAME = jsc;
  • trunk/Source/JavaScriptCore/Configurations/TestAPI.xcconfig

    r85189 r100197  
    2222// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2323
    24 INSTALL_PATH = $(JAVASCRIPTCORE_FRAMEWORKS_DIR)/JavaScriptCore.framework/Versions/A/Resources
     24INSTALL_PATH = $(JAVASCRIPTCORE_FRAMEWORKS_DIR)/JavaScriptCore.framework/Resources
    2525PRODUCT_NAME = testapi;
    2626
  • trunk/Source/JavaScriptCore/Configurations/TestRegExp.xcconfig

    r100195 r100197  
    2222// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2323
    24 INSTALL_PATH = $(JAVASCRIPTCORE_FRAMEWORKS_DIR)/JavaScriptCore.framework/Versions/A/Resources
    25 PRODUCT_NAME = testapi;
     24INSTALL_PATH = $(JAVASCRIPTCORE_FRAMEWORKS_DIR)/JavaScriptCore.framework/Resources
     25PRODUCT_NAME = testRegExp;
    2626
    2727SKIP_INSTALL = $(SKIP_INSTALL_$(FORCE_TOOL_INSTALL));
  • trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r100175 r100197  
    640640                BC9041480EB9250900FE26FA /* StructureTransitionTable.h in Headers */ = {isa = PBXBuildFile; fileRef = BC9041470EB9250900FE26FA /* StructureTransitionTable.h */; settings = {ATTRIBUTES = (Private, ); }; };
    641641                BC95437D0EBA70FD0072B6D3 /* PropertyMapHashTable.h in Headers */ = {isa = PBXBuildFile; fileRef = BC95437C0EBA70FD0072B6D3 /* PropertyMapHashTable.h */; settings = {ATTRIBUTES = (Private, ); }; };
    642                 BCBA2829136A611600B05860 /* testapi.js in Install Support Script */ = {isa = PBXBuildFile; fileRef = 14D857740A4696C80032146C /* testapi.js */; };
    643642                BCCF0D080EF0AAB900413C8F /* StructureStubInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = BCCF0D070EF0AAB900413C8F /* StructureStubInfo.h */; };
    644643                BCCF0D0C0EF0B8A500413C8F /* StructureStubInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCCF0D0B0EF0B8A500413C8F /* StructureStubInfo.cpp */; };
     
    777776                5DBB1511131D0B130056AD36 /* Copy Support Script */ = {
    778777                        isa = PBXCopyFilesBuildPhase;
    779                         buildActionMask = 2147483647;
     778                        buildActionMask = 12;
    780779                        dstPath = "";
    781780                        dstSubfolderSpec = 16;
     
    796795                        name = "Copy Support Script";
    797796                        runOnlyForDeploymentPostprocessing = 0;
    798                 };
    799                 BCBA2828136A610A00B05860 /* Install Support Script */ = {
    800                         isa = PBXCopyFilesBuildPhase;
    801                         buildActionMask = 8;
    802                         dstPath = "$(JAVASCRIPTCORE_FRAMEWORKS_DIR)/JavaScriptCore.framework/Resources";
    803                         dstSubfolderSpec = 0;
    804                         files = (
    805                                 BCBA2829136A611600B05860 /* testapi.js in Install Support Script */,
    806                         );
    807                         name = "Install Support Script";
    808                         runOnlyForDeploymentPostprocessing = 1;
    809797                };
    810798/* End PBXCopyFilesBuildPhase section */
     
    10321020                5D6A566A0F05995500266145 /* Threading.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Threading.cpp; sourceTree = "<group>"; };
    10331021                5DA479650CFBCF56009328A0 /* TCPackedCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TCPackedCache.h; sourceTree = "<group>"; };
     1022                5DAFD6CB146B686300FBEFB4 /* JSC.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = JSC.xcconfig; sourceTree = "<group>"; };
     1023                5DAFD6CC146B68B900FBEFB4 /* TestRegExp.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = TestRegExp.xcconfig; sourceTree = "<group>"; };
    10341024                5DBD18AF0C5401A700C15EAE /* MallocZoneSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MallocZoneSupport.h; sourceTree = "<group>"; };
    10351025                5DE3D0F40DD8DDFB00468714 /* WebKitAvailability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitAvailability.h; sourceTree = "<group>"; };
    10361026                6507D2970E871E4A00D7D896 /* JSTypeInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSTypeInfo.h; sourceTree = "<group>"; };
    10371027                651122E5140469BA002B101D /* testRegExp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = testRegExp.cpp; sourceTree = "<group>"; };
    1038                 651122EE14046A19002B101D /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
    1039                 651122F014046A19002B101D /* regexp_test.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = regexp_test.1; sourceTree = "<group>"; };
    10401028                6511230514046A4C002B101D /* testRegExp */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testRegExp; sourceTree = BUILT_PRODUCTS_DIR; };
    10411029                651DCA02136A6FAB00F74194 /* PassTraits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PassTraits.h; sourceTree = "<group>"; };
     
    15951583                        children = (
    15961584                                8604F4F2143A6C4400B295F5 /* ChangeLog */,
    1597                                 651122E5140469BA002B101D /* testRegExp.cpp */,
    15981585                                A718F8211178EB4B002465A7 /* create_regex_tables */,
    15991586                                937B63CC09E766D200A671DD /* DerivedSources.make */,
     
    16231610                                1C90513E0BA9E8830081E9D0 /* Configurations */,
    16241611                                650FDF8D09D0FCA700769E54 /* Derived Sources */,
    1625                                 651122ED14046A19002B101D /* regexp_test */,
    16261612                                0867D69AFE84028FC02AAC07 /* Frameworks */,
    16271613                                034768DFFF38A50411DB9C8B /* Products */,
     
    16511637                                14BD5A2D0A3E91F600BAF59C /* testapi.c */,
    16521638                                14D857740A4696C80032146C /* testapi.js */,
     1639                                651122E5140469BA002B101D /* testRegExp.cpp */,
    16531640                        );
    16541641                        name = tests;
     
    18451832                                1C9051440BA9E8A70081E9D0 /* DebugRelease.xcconfig */,
    18461833                                449097EE0F8F81B50076A327 /* FeatureDefines.xcconfig */,
     1834                                5DAFD6CB146B686300FBEFB4 /* JSC.xcconfig */,
    18471835                                1C9051430BA9E8A70081E9D0 /* JavaScriptCore.xcconfig */,
    18481836                                BC021BF2136900C300FC5467 /* TestAPI.xcconfig */,
     1837                                5DAFD6CC146B68B900FBEFB4 /* TestRegExp.xcconfig */,
    18491838                                1C9051420BA9E8A70081E9D0 /* Version.xcconfig */,
    18501839                        );
     
    18761865                        tabWidth = 4;
    18771866                        usesTabs = 0;
    1878                 };
    1879                 651122ED14046A19002B101D /* regexp_test */ = {
    1880                         isa = PBXGroup;
    1881                         children = (
    1882                                 651122EE14046A19002B101D /* main.cpp */,
    1883                                 651122F014046A19002B101D /* regexp_test.1 */,
    1884                         );
    1885                         path = regexp_test;
    1886                         sourceTree = "<group>";
    18871867                };
    18881868                65162EF108E6A21C007556CD /* wtf */ = {
     
    29862966                                14BD59BD0A3E8F9000BAF59C /* Frameworks */,
    29872967                                5DBB1511131D0B130056AD36 /* Copy Support Script */,
    2988                                 BCBA2828136A610A00B05860 /* Install Support Script */,
     2968                                5DAFD6CD146B6B6E00FBEFB4 /* Install Support Script */,
    29892969                        );
    29902970                        buildRules = (
     
    30042984                                651122FA14046A4C002B101D /* Sources */,
    30052985                                651122FC14046A4C002B101D /* Frameworks */,
    3006                                 651122FF14046A4C002B101D /* Copy Into Framework */,
    30072986                        );
    30082987                        buildRules = (
     
    31733152                        shellScript = "# Skip for Production builds.\nif [[ ${CONFIGURATION:=Debug} == \"Production\" ]]; then\n    exit\nfi\n\n# Copy and update the jsc binary to refer to JavaScriptcore.framework relative to its location.\nditto \"${BUILT_PRODUCTS_DIR}/jsc\" \"${BUILT_PRODUCTS_DIR}/JavaScriptCore.framework/Resources/jsc\"\ninstall_name_tool -change \"${BUILT_PRODUCTS_DIR}/JavaScriptCore.framework/Versions/A/JavaScriptCore\" \"@loader_path/../JavaScriptCore\" \"${BUILT_PRODUCTS_DIR}/JavaScriptCore.framework/Resources/jsc\"\n";
    31743153                };
    3175                 651122FF14046A4C002B101D /* Copy Into Framework */ = {
     3154                5DAFD6CD146B6B6E00FBEFB4 /* Install Support Script */ = {
    31763155                        isa = PBXShellScriptBuildPhase;
    3177                         buildActionMask = 2147483647;
     3156                        buildActionMask = 8;
    31783157                        files = (
    31793158                        );
    31803159                        inputPaths = (
    3181                                 "$(BUILT_PRODUCTS_DIR)/JavaScriptCore.framework/Resources/jsc",
    3182                         );
    3183                         name = "Copy Into Framework";
     3160                                "$(SRCROOT)/API/tests/testapi.js",
     3161                        );
     3162                        name = "Install Support Script";
    31843163                        outputPaths = (
    3185                         );
    3186                         runOnlyForDeploymentPostprocessing = 0;
     3164                                "$(DSTROOT)$(JAVASCRIPTCORE_FRAMEWORKS_DIR)/JavaScriptCore.framework/Resources/testapi.js",
     3165                        );
     3166                        runOnlyForDeploymentPostprocessing = 1;
    31873167                        shellPath = /bin/sh;
    3188                         shellScript = "# Skip for Production builds.\nif [[ ${CONFIGURATION:=Debug} == \"Production\" ]]; then\n    exit\nfi\n\n# Copy and update the testRegExp binary to refer to JavaScriptcore.framework relative to its location.\nditto \"${BUILT_PRODUCTS_DIR}/testRegExp\" \"${BUILT_PRODUCTS_DIR}/JavaScriptCore.framework/Resources/testRegExp\"\ninstall_name_tool -change \"${BUILT_PRODUCTS_DIR}/JavaScriptCore.framework/Versions/A/JavaScriptCore\" \"@loader_path/../JavaScriptCore\" \"${BUILT_PRODUCTS_DIR}/JavaScriptCore.framework/Resources/testRegExp\"\n";
     3168                        shellScript = "if [[ \"${SKIP_INSTALL}\" == \"NO\" ]]; then\n    cp \"${SRCROOT}/API/tests/testapi.js\" \"${DSTROOT}${JAVASCRIPTCORE_FRAMEWORKS_DIR}/JavaScriptCore.framework/Resources\"\nfi\n";
    31893169                };
    31903170                65FB3F6509D11E9100F49DEB /* Generate Derived Sources */ = {
     
    36083588                149C276808902AFE008A9EFC /* Debug */ = {
    36093589                        isa = XCBuildConfiguration;
     3590                        baseConfigurationReference = 5DAFD6CB146B686300FBEFB4 /* JSC.xcconfig */;
    36103591                        buildSettings = {
    3611                                 PRODUCT_NAME = jsc;
    36123592                        };
    36133593                        name = Debug;
     
    36153595                149C276908902AFE008A9EFC /* Release */ = {
    36163596                        isa = XCBuildConfiguration;
     3597                        baseConfigurationReference = 5DAFD6CB146B686300FBEFB4 /* JSC.xcconfig */;
    36173598                        buildSettings = {
    3618                                 PRODUCT_NAME = jsc;
    36193599                        };
    36203600                        name = Release;
     
    36223602                149C276B08902AFE008A9EFC /* Production */ = {
    36233603                        isa = XCBuildConfiguration;
     3604                        baseConfigurationReference = 5DAFD6CB146B686300FBEFB4 /* JSC.xcconfig */;
    36243605                        buildSettings = {
    3625                                 INSTALL_PATH = "$(JAVASCRIPTCORE_FRAMEWORKS_DIR)/JavaScriptCore.framework/Resources";
    3626                                 PRODUCT_NAME = jsc;
    36273606                        };
    36283607                        name = Production;
     
    36983677                6511230114046A4C002B101D /* Debug */ = {
    36993678                        isa = XCBuildConfiguration;
     3679                        baseConfigurationReference = 5DAFD6CC146B68B900FBEFB4 /* TestRegExp.xcconfig */;
    37003680                        buildSettings = {
    3701                                 PRODUCT_NAME = testRegExp;
    37023681                        };
    37033682                        name = Debug;
     
    37053684                6511230214046A4C002B101D /* Release */ = {
    37063685                        isa = XCBuildConfiguration;
     3686                        baseConfigurationReference = 5DAFD6CC146B68B900FBEFB4 /* TestRegExp.xcconfig */;
    37073687                        buildSettings = {
    3708                                 PRODUCT_NAME = testRegExp;
    37093688                        };
    37103689                        name = Release;
     
    37123691                6511230314046A4C002B101D /* Profiling */ = {
    37133692                        isa = XCBuildConfiguration;
     3693                        baseConfigurationReference = 5DAFD6CC146B68B900FBEFB4 /* TestRegExp.xcconfig */;
    37143694                        buildSettings = {
    3715                                 PRODUCT_NAME = testRegExp;
    37163695                        };
    37173696                        name = Profiling;
     
    37193698                6511230414046A4C002B101D /* Production */ = {
    37203699                        isa = XCBuildConfiguration;
     3700                        baseConfigurationReference = 5DAFD6CC146B68B900FBEFB4 /* TestRegExp.xcconfig */;
    37213701                        buildSettings = {
    3722                                 INSTALL_PATH = "$(JAVASCRIPTCORE_FRAMEWORKS_DIR)/JavaScriptCore.framework/Resources";
    3723                                 PRODUCT_NAME = testRegExp;
    37243702                        };
    37253703                        name = Production;
     
    37933771                A76148430E6402F700E357FA /* Profiling */ = {
    37943772                        isa = XCBuildConfiguration;
     3773                        baseConfigurationReference = 5DAFD6CB146B686300FBEFB4 /* JSC.xcconfig */;
    37953774                        buildSettings = {
    3796                                 PRODUCT_NAME = jsc;
    37973775                        };
    37983776                        name = Profiling;
Note: See TracChangeset for help on using the changeset viewer.