Skip to content

Instantly share code, notes, and snippets.

@christiaanb
Created September 21, 2013 07:33
Show Gist options
  • Save christiaanb/6648192 to your computer and use it in GitHub Desktop.
Save christiaanb/6648192 to your computer and use it in GitHub Desktop.
diff --git rules/relative-dynlib-references.mk rules/relative-dynlib-references.mk
index 03dabc1..ef85f64 100644
--- rules/relative-dynlib-references.mk
+++ rules/relative-dynlib-references.mk
@@ -25,6 +25,9 @@ ifneq "$3" "0"
ifneq "$$($1_$2_TRANSITIVE_DEP_NAMES)" ""
install_name_tool $$(foreach d,$$($1_$2_TRANSITIVE_DEP_NAMES), -change $$(TOP)/$$($$($$d_INSTALL_INFO)_dyn_LIB) @loader_path/../$$d-$$($$($$d_INSTALL_INFO)_VERSION)/$$($$($$d_INSTALL_INFO)_dyn_LIB_NAME)) $$@
endif
+ifneq "$$($1_$2_dyn_LIB_NAME)" ""
+ install_name_tool -id @loader_path/../$$($1_PACKAGE)-$$($1_$2_VERSION)/$$($1_$2_dyn_LIB_NAME) $$@
+endif
# Use relative paths for the RTS. Rather than try to work out which RTS
# way is being linked, we just change it for all ways
install_name_tool $$(foreach w,$$(rts_WAYS), -change $$(TOP)/$$(rts_$$w_LIB) @loader_path/../rts-$$(rts_VERSION)/$$(rts_$$w_LIB_NAME)) $$@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment