Remove non-Apple cruft from the installed WKBase.h
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 14 Sep 2013 21:33:53 +0000 (21:33 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 14 Sep 2013 21:33:53 +0000 (21:33 +0000)
https://bugs.webkit.org/show_bug.cgi?id=121370

Reviewed by Darin Adler.

* Configurations/WebKit2.xcconfig: Set INSTALLHDRS_SCRIPT_PHASE to YES.
* WebKit2.xcodeproj/project.pbxproj: Added a script build phase that runs unifdef on
the installed WKBase.h with __APPLE__ defined and various BUILDING_* and WTF_USE_* symbols
undefined.

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

Source/WebKit2/ChangeLog
Source/WebKit2/Configurations/WebKit2.xcconfig
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj

index dbb968e..00b3430 100644 (file)
@@ -1,5 +1,17 @@
 2013-09-14  Dan Bernstein  <mitz@apple.com>
 
+        Remove non-Apple cruft from the installed WKBase.h
+        https://bugs.webkit.org/show_bug.cgi?id=121370
+
+        Reviewed by Darin Adler.
+
+        * Configurations/WebKit2.xcconfig: Set INSTALLHDRS_SCRIPT_PHASE to YES.
+        * WebKit2.xcodeproj/project.pbxproj: Added a script build phase that runs unifdef on
+        the installed WKBase.h with __APPLE__ defined and various BUILDING_* and WTF_USE_* symbols
+        undefined.
+
+2013-09-14  Dan Bernstein  <mitz@apple.com>
+
         Build fix after r155770.
 
         * UIProcess/API/mac/WKViewPrivate.h: Added WKBase.h import.
index 002427c..04e47ca 100644 (file)
@@ -40,3 +40,5 @@ OTHER_LDFLAGS_macosx = $(FRAMEWORK_AND_LIBRARY_LDFLAGS);
 EXCLUDED_SOURCE_FILE_NAMES = $(EXCLUDED_SOURCE_FILE_NAMES_$(PLATFORM_NAME));
 EXCLUDED_SOURCE_FILE_NAMES_iphoneos = *.pdf;
 EXCLUDED_SOURCE_FILE_NAMES_iphonesimulator = $(EXCLUDED_SOURCE_FILE_NAMES_iphoneos);
+
+INSTALLHDRS_SCRIPT_PHASE = YES;
index 0510535..c7cf5ae 100644 (file)
                        buildConfigurationList = 1DEB91AD08733DA50010E9CD /* Build configuration list for PBXNativeTarget "WebKit2" */;
                        buildPhases = (
                                8DC2EF500486A6940098B216 /* Headers */,
+                               375A248817E5048E00C9A086 /* Postprocess WKBase.h */,
                                8DC2EF520486A6940098B216 /* Resources */,
                                7CB16FEE1724BA05007A0A95 /* Copy Plug-in Sandbox Profiles */,
                                5D1A239015E75B100023E981 /* Copy Message Generation Scripts */,
                        shellPath = /bin/sh;
                        shellScript = "if [ \"${ACTION}\" = \"installhdrs\" ]; then\n    exit 0;\nfi\n\nif [ -f ../../Tools/Scripts/check-for-inappropriate-objc-class-names ]; then\n    ../../Tools/Scripts/check-for-inappropriate-objc-class-names WK || exit $?\nfi";
                };
+               375A248817E5048E00C9A086 /* Postprocess WKBase.h */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                               "$(TARGET_BUILD_DIR)/$(PRIVATE_HEADERS_FOLDER_PATH)/WKBase.h",
+                       );
+                       name = "Postprocess WKBase.h";
+                       outputPaths = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "WKBASE_H=${TARGET_BUILD_DIR}/${PRIVATE_HEADERS_FOLDER_PATH}/WKBase.h\n\nunifdef -B -D__APPLE__ -UBUILDING_GTK__ -UWTF_USE_SOUP -UBUILDING_EFL__ -UBUILDING_QT__ -o ${WKBASE_H} ${WKBASE_H}\n\nif [[ $? > 1 ]]; then\n    exit 1;\nfi";
+               };
                5D1A239215E760590023E981 /* Remove Compiled Python Files */ = {
                        isa = PBXShellScriptBuildPhase;
                        buildActionMask = 2147483647;