aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-11-07 14:21:30 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-11-07 14:22:14 -0400
commit4de51768d9633fcef3c46e6c439892fd752d83b6 (patch)
treee34b5dc6bc440f2d13110ee3ddb0a633fec98873 /Makefile
parent885611d95b428c09f7605a4629274f58d714172a (diff)
OSX: Remove RPATHs from git-annex binary, which are not needed, slow down startup, and break the OSX Sierra linker.
ghc 8.0.2 may make this unncessary, but it's not in a stackage version yet, so put in a workaround. Note that the linux builds already delete the RPATHs for similar reasons. This commit was sponsored by Josh Taylor on Patreon.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index e2413f3c7..e05546c52 100644
--- a/Makefile
+++ b/Makefile
@@ -181,6 +181,11 @@ OSXAPP_BASE=$(OSXAPP_DEST)/Contents/MacOS/bundle
osxapp: Build/Standalone Build/OSXMkLibs
$(MAKE) git-annex
+ # Remove all RPATHs, both because this overloads the linker on
+ # OSX Sierra, and to avoid the binary looking in someone's home
+ # directory.
+ eval install_name_tool $$(otool -l git-annex | grep "path " | sed 's/.*path /-delete_rpath /' | sed 's/ (.*//') git-annex
+
rm -rf "$(OSXAPP_DEST)" "$(OSXAPP_BASE)"
install -d tmp/build-dmg
cp -R standalone/osx/git-annex.app "$(OSXAPP_DEST)"