Changeset 243569 in webkit
- Timestamp:
- Mar 27, 2019, 4:34:04 PM (7 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 1 added
- 2 edited
-
ChangeLog (modified) (1 diff)
-
mac/postprocess-framework-headers.sh (modified) (2 diffs)
-
mac/replace-webkit-additions-includes.py (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r243567 r243569 1 2019-03-27 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Need a way to include WebKitAdditions code in WebKit API headers 4 https://bugs.webkit.org/show_bug.cgi?id=196173 5 6 Reviewed by Tim Horton. 7 8 Introduce a mechanism that allows us to insert code from WebKitAdditions into public or private SDK headers 9 using `#import`s of the form: 10 11 ``` 12 #if USE(APPLE_INTERNAL_SDK) 13 #import <WebKitAdditions/WKWebViewConfigurationAdditions.h> 14 #endif 15 ``` 16 17 The resulting header in the built products directory will contain the contents of the imported file inserted in 18 place of the `#if USE(APPLE_INTERNAL_SDK) … #endif` block; however, when building with the Apple internal SDK, 19 the additions header content will be imported by the usual means. 20 21 * mac/postprocess-framework-headers.sh: 22 * mac/replace-webkit-additions-includes.py: Added. 23 24 Add a step when post-processing framework headers to replace instances of `#if USE(APPLE_INTERNAL_SDK) … #endif` 25 with the text content of the additions files. The replacement script first searches in the built products 26 directory for the matching additions file, and falls back to the SDK if no matching file is found. If neither 27 are present (e.g. a build using the public SDK), then the block is simply replaced by the empty string. 28 29 (read_content_from_webkit_additions): 30 (main): 31 1 32 2019-03-27 Andy Estes <aestes@apple.com> 2 33 -
trunk/Source/WebKit/mac/postprocess-framework-headers.sh
r229958 r243569 49 49 } 50 50 51 function replace_webkit_additions_includes () { 52 if [[ -z `grep '#import <WebKitAdditions/.*\.h>' "${1}"` ]]; then 53 return 0 54 fi 55 python "$(dirname $0)/replace-webkit-additions-includes.py" "${1}" "${BUILT_PRODUCTS_DIR}" "${SDKROOT}" 56 return $? 57 } 58 51 59 function rewrite_headers () { 52 60 if [[ "${WK_PLATFORM_NAME}" == "macosx" ]]; then … … 82 90 if [[ "$HEADER_PATH" -nt $TIMESTAMP_PATH ]]; then 83 91 ditto "${HEADER_PATH}" "${TARGET_TEMP_DIR}/${HEADER_PATH##*/}" 92 replace_webkit_additions_includes "${TARGET_TEMP_DIR}/${HEADER_PATH##*/}" 84 93 sed -i .tmp -E "${SED_OPTIONS[@]}" "${TARGET_TEMP_DIR}/${HEADER_PATH##*/}" || exit $? 85 94 mv "${TARGET_TEMP_DIR}/${HEADER_PATH##*/}" "$HEADER_PATH"
Note:
See TracChangeset
for help on using the changeset viewer.