]> git.saurik.com Git - apple/javascriptcore.git/blame - postprocess-headers.sh
JavaScriptCore-7600.1.4.17.5.tar.gz
[apple/javascriptcore.git] / postprocess-headers.sh
CommitLineData
81345200
A
1cd "${TARGET_BUILD_DIR}/${PUBLIC_HEADERS_FOLDER_PATH}"
2
3if [[ ${TARGET_MAC_OS_X_VERSION_MAJOR} == "1080" ]]; then
4 UNIFDEF_OPTIONS="-DJSC_OBJC_API_AVAILABLE_MAC_OS_X_1080";
5else
6 UNIFDEF_OPTIONS="-UJSC_OBJC_API_AVAILABLE_MAC_OS_X_1080";
7fi
8
9UNIFDEF_OPTIONS+=" -D__MAC_OS_X_VERSION_MIN_REQUIRED=${TARGET_MAC_OS_X_VERSION_MAJOR}"
10
11for ((i = 0; i < ${SCRIPT_INPUT_FILE_COUNT}; ++i)); do
12 eval HEADER=\${SCRIPT_INPUT_FILE_${i}};
13 unifdef -B ${UNIFDEF_OPTIONS} -o ${HEADER}.unifdef ${HEADER}
14 case $? in
15 0)
16 rm ${HEADER}.unifdef
17 ;;
18 1)
19 mv ${HEADER}{.unifdef,}
20 ;;
21 *)
22 exit 1
23 esac
24done
25