From b94f38055fbe8ab975fc8c204843f58670eb8320 Mon Sep 17 00:00:00 2001 From: makaimann Date: Thu, 1 Aug 2019 17:52:37 -0700 Subject: [PATCH] Use python realpath instead of relying on shell realpath (#3117) * 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 * Substitute pwd directly --- contrib/get-antlr-3.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/get-antlr-3.4 b/contrib/get-antlr-3.4 index 670fc3b41..6bfa18c46 100755 --- a/contrib/get-antlr-3.4 +++ b/contrib/get-antlr-3.4 @@ -46,7 +46,7 @@ cd libantlr3c-3.4 # 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 -- 2.30.2