WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
125682
Post-process exported WebKit headers based on PLATFORM_NAME
https://bugs.webkit.org/show_bug.cgi?id=125682
Summary
Post-process exported WebKit headers based on PLATFORM_NAME
Andy Estes
Reported
2013-12-13 00:34:06 PST
Post-process exported WebKit headers based on SDKROOT
Attachments
Post-process exported WebKit headers based on SDKROOT
(3.23 KB, patch)
2013-12-13 00:40 PST
,
Andy Estes
no flags
Details
Formatted Diff
Diff
Post-process exported WebKit headers based on PLATFORM_NAME
(3.25 KB, patch)
2013-12-13 11:19 PST
,
Andy Estes
mitz: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Andy Estes
Comment 1
2013-12-13 00:40:31 PST
Created
attachment 219161
[details]
Post-process exported WebKit headers based on SDKROOT
Andy Estes
Comment 2
2013-12-13 01:11:59 PST
Here's a formatted version of the script: postProcessInDirectory() { cd "$1" shopt -s nocasematch; if [[ ${SDKROOT} =~ iphoneos ]]; then local unifdefOptions="-DTARGET_OS_EMBEDDED=1 -DTARGET_OS_IPHONE=1 -DTARGET_IPHONE_SIMULATOR=0"; elif [[ ${SDKROOT} =~ iphonesimulator ]]; then local unifdefOptions="-DTARGET_OS_EMBEDDED=0 -DTARGET_OS_IPHONE=1 -DTARGET_IPHONE_SIMULATOR=1"; else local unifdefOptions="-DTARGET_OS_EMBEDDED=0 -DTARGET_OS_IPHONE=0 -DTARGET_IPHONE_SIMULATOR=0"; fi for header in $(find . -name '*.h' -type f); do unifdef -B ${unifdefOptions} -o ${header}.unifdef ${header} case $? in 0) rm ${header}.unifdef ;; 1) mv ${header}{.unifdef,} ;; *) exit 1 ;; esac done } postProcessInDirectory "${TARGET_BUILD_DIR}/${PUBLIC_HEADERS_FOLDER_PATH}" postProcessInDirectory "${TARGET_BUILD_DIR}/${PRIVATE_HEADERS_FOLDER_PATH}"
mitz
Comment 3
2013-12-13 09:34:27 PST
(In reply to
comment #2
)
> Here's a formatted version of the script: > > postProcessInDirectory() { > cd "$1" > > shopt -s nocasematch; > if [[ ${SDKROOT} =~ iphoneos ]]; then
SDKROOT is a path which may contain arbitrary components, any of which may match “iphoneos”. Could we use PLATFORM_NAME here?
Andy Estes
Comment 4
2013-12-13 10:17:42 PST
(In reply to
comment #3
)
> (In reply to
comment #2
) > > Here's a formatted version of the script: > > > > postProcessInDirectory() { > > cd "$1" > > > > shopt -s nocasematch; > > if [[ ${SDKROOT} =~ iphoneos ]]; then > > SDKROOT is a path which may contain arbitrary components, any of which may match “iphoneos”. Could we use PLATFORM_NAME here?
Good point. Yes, I can use PLATFORM_NAME instead.
Andy Estes
Comment 5
2013-12-13 11:19:55 PST
Created
attachment 219176
[details]
Post-process exported WebKit headers based on PLATFORM_NAME
Andy Estes
Comment 6
2013-12-13 11:21:06 PST
(In reply to
comment #5
)
> Created an attachment (id=219176) [details] > Post-process exported WebKit headers based on PLATFORM_NAME
Here's the updated script with formatting: postProcessInDirectory() { cd "$1" shopt -s nocasematch; if [[ ${PLATFORM_NAME} == iphoneos ]]; then local unifdefOptions="-DTARGET_OS_EMBEDDED=1 -DTARGET_OS_IPHONE=1 -DTARGET_IPHONE_SIMULATOR=0"; elif [[ ${PLATFORM_NAME} == iphonesimulator ]]; then local unifdefOptions="-DTARGET_OS_EMBEDDED=0 -DTARGET_OS_IPHONE=1 -DTARGET_IPHONE_SIMULATOR=1"; else local unifdefOptions="-DTARGET_OS_EMBEDDED=0 -DTARGET_OS_IPHONE=0 -DTARGET_IPHONE_SIMULATOR=0"; fi for header in $(find . -name '*.h' -type f); do unifdef -B ${unifdefOptions} -o ${header}.unifdef ${header} case $? in 0) rm ${header}.unifdef ;; 1) mv ${header}{.unifdef,} ;; *) exit 1 ;; esac done } postProcessInDirectory "${TARGET_BUILD_DIR}/${PUBLIC_HEADERS_FOLDER_PATH}" postProcessInDirectory "${TARGET_BUILD_DIR}/${PRIVATE_HEADERS_FOLDER_PATH}"
Andy Estes
Comment 7
2013-12-13 11:22:07 PST
(In reply to
comment #6
)
> (In reply to
comment #5
) > > Created an attachment (id=219176) [details] [details] > > Post-process exported WebKit headers based on PLATFORM_NAME > > Here's the updated script with formatting: > > shopt -s nocasematch;
Oops. This line can be removed now.
mitz
Comment 8
2013-12-13 11:38:31 PST
Comment on
attachment 219176
[details]
Post-process exported WebKit headers based on PLATFORM_NAME r=me How long does this step take?
Andy Estes
Comment 9
2013-12-13 12:42:53 PST
(In reply to
comment #8
)
> (From update of
attachment 219176
[details]
) > r=me
Thanks!
> How long does this step take?
When no headers require post-processing, the step takes ~1.2s. With a clean build in a tree containing the iOS port's modifications to WebKit headers, the step takes ~1.4s. This is on a Late 2012 13-inch MacBook Pro with Retina display.
Andy Estes
Comment 10
2013-12-13 13:16:08 PST
Committed
r160559
: <
http://trac.webkit.org/changeset/160559
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug