Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
2b811329
Commit
2b811329
authored
Mar 22, 2005
by
wolfgang
Browse files
[project @ 2005-03-22 06:37:57 by wolfgang]
Mac OS X: Make bindist work with dynamic libraries MERGE TO STABLE
parent
c6f9cbaa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
2b811329
...
...
@@ -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>'
...
...
distrib/Makefile-bin.in
View file @
2b811329
...
...
@@ -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
...
...
mk/fix_install_names.sh
View file @
2b811329
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment