* Use a custom implementation instead of relying on realpath, because it doesn't exist on Mac
* Use local variables and move portable_realpath to its own file
* Replace portable_realpath with python realpath
* Consistent command substitution
Co-Authored-By: Andres Noetzli <andres.noetzli@gmail.com>
* Substitute pwd directly
# Use an absolute path for the installation directory to avoid spurious libtool
# warnings about the ANTLR library having moved
-PREFIX=$(realpath `pwd`/../..)
+PREFIX=$(python -c "import os; print(os.path.realpath('$(pwd)/../..'))")
# Make antlr3debughandlers.c empty to avoid unreferenced symbols
rm -rf src/antlr3debughandlers.c && touch src/antlr3debughandlers.c