3 # Clean left overs from previous builds if there are any
4 rm -f -R antlr4-runtime build lib 2> /dev/null
5 rm antlr4-cpp-runtime-macos.zip 2> /dev/null
8 mkdir -p runtime/thirdparty 2> /dev/null
9 pushd runtime/thirdparty
12 git clone https://github.com/nemtrif/utfcpp.git utfcpp
14 git checkout tags/v3.1.1
20 xcodebuild -project runtime/antlrcpp.xcodeproj \
22 # GCC_PREPROCESSOR_DEFINITIONS='$GCC_PREPROCESSOR_DEFINITIONS USE_UTF8_INSTEAD_OF_CODECVT' \
23 -configuration Release
24 xcodebuild -project runtime/antlrcpp.xcodeproj \
25 -target antlr4_static \
26 # GCC_PREPROCESSOR_DEFINITIONS='$GCC_PREPROCESSOR_DEFINITIONS USE_UTF8_INSTEAD_OF_CODECVT' \
27 -configuration Release
30 mv runtime/build/Release/libantlr4-runtime.a lib/
31 mv runtime/build/Release/libantlr4-runtime.dylib lib/
34 rm -f -R antlr4-runtime
36 find . -name '*.h' | cpio -pdm ../../antlr4-runtime
38 pushd runtime/thirdparty/utfcpp/source
39 find . -name '*.h' | cpio -pdm ../../../../antlr4-runtime
43 zip -r antlr4-cpp-runtime-macos.zip antlr4-runtime lib
45 rm -f -R antlr4-runtime build lib
48 #cp antlr4-cpp-runtime-macos.zip ~/antlr/sites/website-antlr4/download