Commit 2b811329 authored by wolfgang's avatar wolfgang

[project @ 2005-03-22 06:37:57 by wolfgang]

Mac OS X: Make bindist work with dynamic libraries

MERGE TO STABLE
parent c6f9cbaa
......@@ -211,6 +211,10 @@ BIN_DIST_TOP= distrib/Makefile-bin.in \
config.sub \
aclocal.m4
ifeq "$(darwin_TARGET_OS)" "1"
BIN_DIST_TOP+=mk/fix_install_names.sh
endif
#
# binary-dist creates a binary bundle, set BIN_DIST_NAME
# to package name and do `make binary-dist Project=<project-name>'
......
......@@ -173,6 +173,13 @@ config-pkgs ::
$(SED) -e "s|\$$libdir|$(libdir)|g;s|\$$datadir|$(datadir)|g" <lib/$(platform)/$$i.bak >lib/$(platform)/$$i; \
fi; \
done
@if test "$(platform)" == "powerpc-apple-darwin"; then \
echo "Configuring install names..."; \
for i in lib/$(platform)/*; do \
sh fix_install_names.sh "$(libdir)" "$$i"; \
done; \
echo "Done."; \
fi
in-place ::
$(MAKE) $(MFLAGS) config-pkgs bindir=`pwd`/bin/$(platform) libdir=`pwd`/lib/$(platform) datadir=`pwd`/share
......
......@@ -7,6 +7,13 @@
prefix=$1
file=$2
type=`file "$file"`
if `test "${type/Mach-O}" == "$type"`
then
exit
fi
if `test x${prefix%/} != x"" `
then
prefix=${prefix%/}/
......@@ -16,6 +23,10 @@ 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
install_name_tool -change $i "$prefix`basename $i`" $file
done
if `test "${file%.dylib}" != "${file}"`
then
install_name_tool -id "$prefix`basename $file`" $file
fi
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