abouttreesummaryrefslogcommitdiff
path: root/antlr4-cpp-runtime-4.9.2-source/deploy-macos.sh
diff options
context:
space:
mode:
authorPatrick Schönberger2021-08-14 14:56:12 +0200
committerPatrick Schönberger2021-08-14 14:56:12 +0200
commitc6ad2948bb98d42f8e0883ef82cd14cd2d5eda60 (patch)
tree9e83d6d8f61e56f5d3425b8709314d6bdb9315a9 /antlr4-cpp-runtime-4.9.2-source/deploy-macos.sh
parent9f94b672a5dc32da5ad01742bd4e976315a30d9c (diff)
downloadtoc-c6ad2948bb98d42f8e0883ef82cd14cd2d5eda60.tar.gz
toc-c6ad2948bb98d42f8e0883ef82cd14cd2d5eda60.zip
add antlr source code and ReadMeHEADmain
Diffstat (limited to 'antlr4-cpp-runtime-4.9.2-source/deploy-macos.sh')
-rw-r--r--antlr4-cpp-runtime-4.9.2-source/deploy-macos.sh48
1 files changed, 48 insertions, 0 deletions
diff --git a/antlr4-cpp-runtime-4.9.2-source/deploy-macos.sh b/antlr4-cpp-runtime-4.9.2-source/deploy-macos.sh
new file mode 100644
index 0000000..cf97765
--- /dev/null
+++ b/antlr4-cpp-runtime-4.9.2-source/deploy-macos.sh
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+# Clean left overs from previous builds if there are any
+rm -f -R antlr4-runtime build lib 2> /dev/null
+rm antlr4-cpp-runtime-macos.zip 2> /dev/null
+
+# Get utf8 dependency.
+mkdir -p runtime/thirdparty 2> /dev/null
+pushd runtime/thirdparty
+if [ ! -d utfcpp ]
+then
+ git clone https://github.com/nemtrif/utfcpp.git utfcpp
+ pushd utfcpp
+ git checkout tags/v3.1.1
+ popd
+fi
+popd
+
+# Binaries
+xcodebuild -project runtime/antlrcpp.xcodeproj \
+ -target antlr4 \
+ # GCC_PREPROCESSOR_DEFINITIONS='$GCC_PREPROCESSOR_DEFINITIONS USE_UTF8_INSTEAD_OF_CODECVT' \
+ -configuration Release
+xcodebuild -project runtime/antlrcpp.xcodeproj \
+ -target antlr4_static \
+ # GCC_PREPROCESSOR_DEFINITIONS='$GCC_PREPROCESSOR_DEFINITIONS USE_UTF8_INSTEAD_OF_CODECVT' \
+ -configuration Release
+rm -f -R lib
+mkdir lib
+mv runtime/build/Release/libantlr4-runtime.a lib/
+mv runtime/build/Release/libantlr4-runtime.dylib lib/
+
+# Headers
+rm -f -R antlr4-runtime
+pushd runtime/src
+find . -name '*.h' | cpio -pdm ../../antlr4-runtime
+popd
+pushd runtime/thirdparty/utfcpp/source
+find . -name '*.h' | cpio -pdm ../../../../antlr4-runtime
+popd
+
+# Zip up and clean up
+zip -r antlr4-cpp-runtime-macos.zip antlr4-runtime lib
+
+rm -f -R antlr4-runtime build lib
+
+# Deploy
+#cp antlr4-cpp-runtime-macos.zip ~/antlr/sites/website-antlr4/download