Commit 3463d1d3 authored by wolfgang's avatar wolfgang

[project @ 2005-01-23 18:18:05 by wolfgang]

Darwin / Mac OS X:

For builds with dynamic libraries, fix up dynamic library paths
("install names") for binaries. Otherwise, a dynamically-linked stage2 ghc
would contain the path names of the build directories.
parent fa8246c7
# Darwin / Mac OS X only
# sh fix_install_names.sh directory binary
#
# Changes 'binary' to assume that all libHS*_dyn.dylib libraries
# are to be found in 'directory'.
prefix=$1
file=$2
if `test x${prefix%/} != x"" `
then
prefix=${prefix%/}/
fi
for i in `otool -L $file \
| grep 'libHS.*_dyn.dylib' \
| sed 's/.\(.*libHS.*_dyn.dylib\).*/\1/'`
do
install_name_tool -change $i $prefix`basename $i` $file
done
......@@ -727,6 +727,9 @@ install:: $(INSTALL_PROGS)
@for i in $(INSTALL_PROGS); do \
echo $(INSTALL_PROGRAM) $(INSTALL_BIN_OPTS) $$i $(bindir); \
$(INSTALL_PROGRAM) $(INSTALL_BIN_OPTS) $$i $(bindir) ; \
if `test $(darwin_TARGET_OS) == 1` ; \
then sh $(FPTOOLS_TOP)/mk/fix_install_names.sh $(libdir) $(bindir)/$$i ; \
fi ; \
done
endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment