Last active
November 20, 2015 11:18
-
-
Save kristopherjohnson/5cd70b4eaf68da2b1992 to your computer and use it in GitHub Desktop.
Xcode build-phase script that generates source files if they are not present or if input file is newer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| src="$SRCROOT/myproject/input.json" | |
| dst_hpp="$SRCROOT/myproject/output.hpp" | |
| dst_cpp="$SRCROOT/myproject/output.cpp" | |
| if [ "$src" -nt "$dst_hpp" ] || [ "$src" -nt "$dst_cpp" ]; then | |
| echo "Generating $dst_hpp and $dst_cpp..." | |
| "$BUILT_PRODUCTS_DIR/codegenerator" "$src" "$dst_hpp" "$dst_cpp" | |
| else | |
| echo "$dst_hpp and $dst_cpp are up to date." | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment