Adopt WK_PLATFORM_NAME in WebKitLegacy
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Mar 2018 22:47:48 +0000 (22:47 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Mar 2018 22:47:48 +0000 (22:47 +0000)
https://bugs.webkit.org/show_bug.cgi?id=183948
<rdar://problem/38803908>

Reviewed by Dan Bernstein.

Source/WebKitLegacy:

* WebKitLegacy.xcodeproj/project.pbxproj:

Source/WebKitLegacy/mac:

* Configurations/WebKitLegacy.xcconfig:
* MigrateHeaders.make:
* postprocess-headers.sh:

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

Source/WebKitLegacy/ChangeLog
Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/Configurations/WebKitLegacy.xcconfig
Source/WebKitLegacy/mac/MigrateHeaders.make
Source/WebKitLegacy/mac/postprocess-headers.sh

index 34e7db4..193a1e1 100644 (file)
@@ -1,3 +1,13 @@
+2018-03-23  Tim Horton  <timothy_horton@apple.com>
+
+        Adopt WK_PLATFORM_NAME in WebKitLegacy
+        https://bugs.webkit.org/show_bug.cgi?id=183948
+        <rdar://problem/38803908>
+
+        Reviewed by Dan Bernstein.
+
+        * WebKitLegacy.xcodeproj/project.pbxproj:
+
 2018-02-28  Alex Christensen  <achristensen@webkit.org>
 
         Reduce use of NetworkingContext in WebKit
index f551fa4..6c42a74 100644 (file)
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                        shellPath = /bin/sh;
-                       shellScript = "if [[ ${PLATFORM_NAME} != \"macosx\" ]]; then\n    exit 0\nfi\n\n[[ -h \"${TARGET_BUILD_DIR}/WebKitLegacy.framework/WebKitPluginHost.app\" ]] || ln -s Versions/Current/WebKitPluginHost.app \"${TARGET_BUILD_DIR}/WebKitLegacy.framework/WebKitPluginHost.app\"\n[[ -h \"${TARGET_BUILD_DIR}/WebKitLegacy.framework/WebKitPluginAgent\" ]] || ln -s Versions/Current/WebKitPluginAgent \"${TARGET_BUILD_DIR}/WebKitLegacy.framework/WebKitPluginAgent\"\n\nif [[ \"${CONFIGURATION}\" != \"Production\" && ${ACTION} == \"build\"  && ! -e \"${TARGET_BUILD_DIR}/WebKitLegacy.framework/Versions/A/WebKitPluginHost.app\" ]]; then\n    if [[ -e \"/System/Library/Frameworks/WebKit.framework/WebKitPluginHost.app\" ]]; then\n        ln -s /System/Library/Frameworks/WebKit.framework/WebKitPluginHost.app \"${TARGET_BUILD_DIR}/WebKitLegacy.framework/Versions/A/WebKitPluginHost.app\"\n    else\n        ln -s /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebKitLegacy.framework/WebKitPluginHost.app \"${TARGET_BUILD_DIR}/WebKitLegacy.framework/Versions/A/WebKitPluginHost.app\"\n    fi\nfi\n";
+                       shellScript = "if [[ ${WK_PLATFORM_NAME} != \"macosx\" ]]; then\n    exit 0\nfi\n\n[[ -h \"${TARGET_BUILD_DIR}/WebKitLegacy.framework/WebKitPluginHost.app\" ]] || ln -s Versions/Current/WebKitPluginHost.app \"${TARGET_BUILD_DIR}/WebKitLegacy.framework/WebKitPluginHost.app\"\n[[ -h \"${TARGET_BUILD_DIR}/WebKitLegacy.framework/WebKitPluginAgent\" ]] || ln -s Versions/Current/WebKitPluginAgent \"${TARGET_BUILD_DIR}/WebKitLegacy.framework/WebKitPluginAgent\"\n\nif [[ \"${CONFIGURATION}\" != \"Production\" && ${ACTION} == \"build\"  && ! -e \"${TARGET_BUILD_DIR}/WebKitLegacy.framework/Versions/A/WebKitPluginHost.app\" ]]; then\n    if [[ -e \"/System/Library/Frameworks/WebKit.framework/WebKitPluginHost.app\" ]]; then\n        ln -s /System/Library/Frameworks/WebKit.framework/WebKitPluginHost.app \"${TARGET_BUILD_DIR}/WebKitLegacy.framework/Versions/A/WebKitPluginHost.app\"\n    else\n        ln -s /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebKitLegacy.framework/WebKitPluginHost.app \"${TARGET_BUILD_DIR}/WebKitLegacy.framework/Versions/A/WebKitPluginHost.app\"\n    fi\nfi\n";
                };
                1C395DE20C6BE8E0000D1E52 /* Generate Export Files */ = {
                        isa = PBXShellScriptBuildPhase;
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                        shellPath = /bin/sh;
-                       shellScript = "mkdir -p \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy\"\n\nif [[ \"${PLATFORM_NAME}\" != \"macosx\" ]]; then\n    cat \"${PROJECT_DIR}/mac/WebKit.exp\" \"${PROJECT_DIR}/ios/WebKit.iOS.exp\" > \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy/WebKitLegacy.generated.exp\"\nelse\n    cat \"${PROJECT_DIR}/mac/WebKit.exp\" \"${PROJECT_DIR}/mac/WebKit.mac.exp\" > \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy/WebKitLegacy.generated.exp\"\nfi\n\nif [ -f \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy/ReexportedWebCoreSymbols_${CURRENT_ARCH}.exp\" ]; then\n    cat \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy/ReexportedWebCoreSymbols_${CURRENT_ARCH}.exp\" >> \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy/WebKitLegacy.generated.exp\"\nfi\n\n# exclude Carbon functions on 64-bit\nsed -e s/^_HIWebViewCreate$// -e s/^_HIWebViewGetWebView$// -e s/^_WebConvertNSImageToCGImageRef$// -e s/^_WebInitForCarbon$// \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy/WebKitLegacy.generated.exp\" > \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy/WebKitLegacy.LP64.exp\"\n\n# exclude OBJC_IVAR for i386\ngrep -v \"_OBJC_IVAR\" \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy/WebKitLegacy.generated.exp\" > \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy/WebKitLegacy.i386.exp\"";
+                       shellScript = "mkdir -p \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy\"\n\nif [[ \"${WK_PLATFORM_NAME}\" != \"macosx\" ]]; then\n    cat \"${PROJECT_DIR}/mac/WebKit.exp\" \"${PROJECT_DIR}/ios/WebKit.iOS.exp\" > \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy/WebKitLegacy.generated.exp\"\nelse\n    cat \"${PROJECT_DIR}/mac/WebKit.exp\" \"${PROJECT_DIR}/mac/WebKit.mac.exp\" > \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy/WebKitLegacy.generated.exp\"\nfi\n\nif [ -f \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy/ReexportedWebCoreSymbols_${CURRENT_ARCH}.exp\" ]; then\n    cat \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy/ReexportedWebCoreSymbols_${CURRENT_ARCH}.exp\" >> \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy/WebKitLegacy.generated.exp\"\nfi\n\n# exclude Carbon functions on 64-bit\nsed -e s/^_HIWebViewCreate$// -e s/^_HIWebViewGetWebView$// -e s/^_WebConvertNSImageToCGImageRef$// -e s/^_WebInitForCarbon$// \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy/WebKitLegacy.generated.exp\" > \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy/WebKitLegacy.LP64.exp\"\n\n# exclude OBJC_IVAR for i386\ngrep -v \"_OBJC_IVAR\" \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy/WebKitLegacy.generated.exp\" > \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy/WebKitLegacy.i386.exp\"";
                };
                1C6CB0510AA63EB000D23BFD /* Migrate Headers */ = {
                        isa = PBXShellScriptBuildPhase;
index f26ded4..662e3ac 100644 (file)
@@ -1,3 +1,15 @@
+2018-03-23  Tim Horton  <timothy_horton@apple.com>
+
+        Adopt WK_PLATFORM_NAME in WebKitLegacy
+        https://bugs.webkit.org/show_bug.cgi?id=183948
+        <rdar://problem/38803908>
+
+        Reviewed by Dan Bernstein.
+
+        * Configurations/WebKitLegacy.xcconfig:
+        * MigrateHeaders.make:
+        * postprocess-headers.sh:
+
 2018-03-23  Brady Eidson  <beidson@apple.com>
 
         Go to back/forward list items after a process-swapped navigation.
index 9f9152d..620a25a 100644 (file)
 #include "FeatureDefines.xcconfig"
 #include "Version.xcconfig"
 
-EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*] = *.defs *.nib *.pdf *.tiff CarbonUtils.* CarbonWindowAdapter.* CarbonWindowContentView.* CarbonWindowFrame.* HIViewAdapter.* HIWebView.* OutlookQuirksUserScript.js PopupMenuMac.* SearchPopupMenuMac.* WebClipView.* WebDashboardRegion.* WebDynamicScrollBarsView.* WebIconDatabase.* WebInspectorClient.* WebJavaScriptTextInputPanel.* WebNSEventExtras.* WebNSPasteboardExtras.* WebNSWindowExtras.* WebPanelAuthenticationHandler.* WebPluginsPrivate.* WebStringTruncator.* WebTextCompletionController.*;
-EXCLUDED_SOURCE_FILE_NAMES[sdk=macosx*] = *IOS.mm MemoryMeasure.h WebCaretChangeListener.h WebFixedPositionContent.h WebFrameIOS.h WebFrameIPhone.h WebGeolocationCoreLocationProvider.h WebGeolocationPrivate.h WebGeolocationProviderIOS.h WebMIMETypeRegistry.h WebNSStringExtrasIOS.h WebNSStringExtrasIPhone.h WebPDFViewIOS.h WebPDFViewIPhone.h WebPDFViewPlaceholder.h WebSelectionRect.h WebUIKitDelegate.h WebUIKitSupport.h WebVisiblePosition.h DOMHTMLTextAreaElementPrivate.h DOMUIKitExtensions.h;
+EXCLUDED_SOURCE_FILE_NAMES = $(EXCLUDED_SOURCE_FILE_NAMES_$(WK_COCOA_TOUCH));
+EXCLUDED_SOURCE_FILE_NAMES_cocoatouch = *.defs *.nib *.pdf *.tiff CarbonUtils.* CarbonWindowAdapter.* CarbonWindowContentView.* CarbonWindowFrame.* HIViewAdapter.* HIWebView.* OutlookQuirksUserScript.js PopupMenuMac.* SearchPopupMenuMac.* WebClipView.* WebDashboardRegion.* WebDynamicScrollBarsView.* WebIconDatabase.* WebInspectorClient.* WebJavaScriptTextInputPanel.* WebNSEventExtras.* WebNSPasteboardExtras.* WebNSWindowExtras.* WebPanelAuthenticationHandler.* WebPluginsPrivate.* WebStringTruncator.* WebTextCompletionController.*;
+EXCLUDED_SOURCE_FILE_NAMES_ = *IOS.mm MemoryMeasure.h WebCaretChangeListener.h WebFixedPositionContent.h WebFrameIOS.h WebFrameIPhone.h WebGeolocationCoreLocationProvider.h WebGeolocationPrivate.h WebGeolocationProviderIOS.h WebMIMETypeRegistry.h WebNSStringExtrasIOS.h WebNSStringExtrasIPhone.h WebPDFViewIOS.h WebPDFViewIPhone.h WebPDFViewPlaceholder.h WebSelectionRect.h WebUIKitDelegate.h WebUIKitSupport.h WebVisiblePosition.h DOMHTMLTextAreaElementPrivate.h DOMUIKitExtensions.h;
 
-EXPORTED_SYMBOLS_FILE = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/WebKitLegacy.generated.exp;
-EXPORTED_SYMBOLS_FILE[sdk=macosx*][arch=i386] = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/WebKitLegacy.i386.exp;
-EXPORTED_SYMBOLS_FILE[sdk=macosx*][arch=x86_64] = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/WebKitLegacy.LP64.exp;
+EXPORTED_SYMBOLS_FILE = $(EXPORTED_SYMBOLS_FILE_$(WK_COCOA_TOUCH));
+EXPORTED_SYMBOLS_FILE_cocoatouch = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/WebKitLegacy.generated.exp;
+EXPORTED_SYMBOLS_FILE_[arch=i386] = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/WebKitLegacy.i386.exp;
+EXPORTED_SYMBOLS_FILE_[arch=x86_64] = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/WebKitLegacy.LP64.exp;
 
 WK_XCODE_SUPPORTS_TEXT_BASED_STUBS = $(WK_NOT_$(WK_EMPTY_$(TAPI_VERIFY_MODE)));
 WK_PRIVATE_FRAMEWORKS_DIR = $(WK_PRIVATE_FRAMEWORKS_DIR_$(USE_INTERNAL_SDK));
@@ -68,8 +70,22 @@ PRODUCT_NAME = WebKitLegacy;
 PRODUCT_BUNDLE_IDENTIFIER = com.apple.$(PRODUCT_NAME:rfc1034identifier);
 UMBRELLA_FRAMEWORKS_DIR = $(PRODUCTION_FRAMEWORKS_DIR)/WebKit.framework/Versions/A/Frameworks;
 
-OTHER_LDFLAGS[sdk=iphone*] = $(inherited) -lobjc -lsqlite3 -framework CFNetwork -framework CoreFoundation -framework CoreGraphics -framework CoreText -framework Foundation -framework GraphicsServices -framework ImageIO -framework OpenGLES -framework MobileCoreServices -lMobileGestalt;
-OTHER_LDFLAGS[sdk=macosx*] = $(inherited) -framework Carbon -framework Cocoa -framework IOKit -framework OpenGL;
+WK_APPKIT_LDFLAGS = $(WK_APPKIT_LDFLAGS_$(WK_PLATFORM_NAME));
+WK_APPKIT_LDFLAGS_macosx = -framework AppKit;
+
+WK_CARBON_LDFLAGS = $(WK_CARBON_LDFLAGS_$(WK_PLATFORM_NAME));
+WK_CARBON_LDFLAGS_macosx = -framework Carbon;
+
+WK_GRAPHICS_SERVICES_LDFLAGS = $(WK_GRAPHICS_SERVICES_LDFLAGS_$(WK_COCOA_TOUCH));
+WK_GRAPHICS_SERVICES_LDFLAGS_cocoatouch = -framework GraphicsServices;
+
+WK_MOBILE_CORE_SERVICES_LDFLAGS = $(WK_MOBILE_CORE_SERVICES_LDFLAGS_$(WK_COCOA_TOUCH));
+WK_MOBILE_CORE_SERVICES_LDFLAGS_cocoatouch = -framework MobileCoreServices;
+
+WK_MOBILE_GESTALT_LDFLAGS = $(WK_MOBILE_GESTALT_LDFLAGS_$(WK_COCOA_TOUCH));
+WK_MOBILE_GESTALT_LDFLAGS_cocoatouch = -lMobileGestalt;
+
+OTHER_LDFLAGS = -lobjc -lsqlite3 -framework CFNetwork -framework CoreFoundation -framework CoreGraphics -framework CoreText -framework Foundation -framework ImageIO -framework IOKit $(WK_APPKIT_LDFLAGS) $(WK_CARBON_LDFLAGS) $(WK_GRAPHICS_SERVICES_LDFLAGS) $(WK_MOBILE_CORE_SERVICES_LDFLAGS) $(WK_MOBILE_GESTALT_LDFLAGS);
 
 SECTORDER_FLAGS = $(SECTORDER_FLAGS_$(CONFIGURATION));
 SECTORDER_FLAGS_Production[sdk=iphoneos*] = -Wl,-order_file,$(SDKROOT)/AppleInternal/OrderFiles/WebKitLegacy.order;
index 5931325..743bdff 100644 (file)
@@ -34,7 +34,7 @@ HEADERS = \
     $(PRIVATE_HEADERS_DIR)/WebScriptObject.h \
 #
 
-ifeq ($(PLATFORM_NAME), macosx)
+ifeq ($(WK_PLATFORM_NAME), macosx)
 HEADERS += \
     $(PRIVATE_HEADERS_DIR)/npapi.h \
     $(PRIVATE_HEADERS_DIR)/npfunctions.h \
@@ -43,7 +43,7 @@ HEADERS += \
 #
 endif
 
-ifneq ($(PLATFORM_NAME), macosx)
+ifneq ($(WK_PLATFORM_NAME), macosx)
 HEADERS += \
     $(PRIVATE_HEADERS_DIR)/AbstractPasteboard.h \
     $(PRIVATE_HEADERS_DIR)/KeyEventCodesIOS.h \
@@ -76,7 +76,7 @@ WEBCORE_HEADER_MIGRATE_CMD = sed -E $(WEBCORE_HEADER_REPLACE_RULES) $< > $@; tou
 $(PRIVATE_HEADERS_DIR)/% : % MigrateHeaders.make
        $(WEBCORE_HEADER_MIGRATE_CMD)
 
-ifneq ($(PLATFORM_NAME), macosx)
+ifneq ($(WK_PLATFORM_NAME), macosx)
 REEXPORT_FILE = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/ReexportedWebCoreSymbols_$(CURRENT_ARCH).exp
 
 all : $(REEXPORT_FILE)
index e2cce35..4bdeaac 100755 (executable)
@@ -14,9 +14,9 @@ postProcessInDirectory()
         USE_APPLE_INTERNAL_SDK=0
     fi
 
-    if [[ ${PLATFORM_NAME} == macosx ]]; then
+    if [[ ${WK_PLATFORM_NAME} == macosx ]]; then
         unifdefOptions="-DTARGET_OS_IPHONE=0 -DTARGET_OS_SIMULATOR=0";
-    elif [[ ${PLATFORM_NAME} == *simulator* ]]; then
+    elif [[ ${WK_PLATFORM_NAME} == *simulator* ]]; then
         unifdefOptions="-DTARGET_OS_IPHONE=1 -DTARGET_OS_SIMULATOR=1 -DUSE_APPLE_INTERNAL_SDK=${USE_APPLE_INTERNAL_SDK}";
     else
         unifdefOptions="-DTARGET_OS_IPHONE=1 -DTARGET_OS_SIMULATOR=0 -DUSE_APPLE_INTERNAL_SDK=${USE_APPLE_INTERNAL_SDK}";
@@ -36,7 +36,7 @@ postProcessInDirectory()
         fi
     done
 
-    if [[ ${PLATFORM_NAME} == macosx ]]; then
+    if [[ ${WK_PLATFORM_NAME} == macosx ]]; then
         sedExpression='s/WEBKIT_((CLASS_|ENUM_)?AVAILABLE|DEPRECATED)/NS_\1/g';
     else
         sedExpression='s/ *WEBKIT_((CLASS_|ENUM_)?AVAILABLE|DEPRECATED)_MAC\([^)]+\)//g';