]> git.saurik.com Git - apple/javascriptcore.git/blob - postprocess-headers.sh
JavaScriptCore-7600.1.4.11.8.tar.gz
[apple/javascriptcore.git] / postprocess-headers.sh
1 cd "${TARGET_BUILD_DIR}/${PUBLIC_HEADERS_FOLDER_PATH}"
2
3 if [[ ${TARGET_MAC_OS_X_VERSION_MAJOR} == "1080" ]]; then
4 UNIFDEF_OPTIONS="-DJSC_OBJC_API_AVAILABLE_MAC_OS_X_1080";
5 else
6 UNIFDEF_OPTIONS="-UJSC_OBJC_API_AVAILABLE_MAC_OS_X_1080";
7 fi
8
9 UNIFDEF_OPTIONS+=" -D__MAC_OS_X_VERSION_MIN_REQUIRED=${TARGET_MAC_OS_X_VERSION_MAJOR}"
10
11 for ((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
24 done
25