File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -879,6 +879,13 @@ _build/bindist: stage2 driver/ghc-usage.txt driver/ghci-usage.txt
879879 $@ /bin/ghc-pkg recache
880880 # Copy headers
881881 @$(call copy_all_stage2_h,$@ /bin/ghc-pkg)
882+ # Add basename symlinks for nested shared libs (.dylib, .so) in lib/$(HOST_PLATFORM)
883+ @if [ -d " $@ /lib/$( HOST_PLATFORM) " ]; then \
884+ cd " $@ /lib/$( HOST_PLATFORM) " ; \
885+ for lib in $$ (find . -mindepth 2 \( -name " *.dylib" -o -name " *.so" \) -type f) ; do \
886+ ln -sf " $$ lib" " $$ (basename " $$ lib" )" ; \
887+ done ; \
888+ fi
882889 @echo " ::endgroup::"
883890
884891_build/bindist/ghc.tar.gz : _build/bindist
@@ -903,6 +910,13 @@ _build/bindist/lib/targets/%: _build/bindist driver/ghc-usage.txt driver/ghci-us
903910 # Copy libraries and settings
904911 @if [ -e $( CURDIR) /_build/bindist/lib/targets/$( @F) /lib/$( @F) ] ; then find $(CURDIR ) /_build/bindist/lib/targets/$(@F ) /lib/$(@F ) / -mindepth 1 -type f -name " *.so" -execdir mv ' {}' $(CURDIR ) /_build/bindist/lib/targets/$(@F ) /lib/$(@F ) /' {}' \; ; fi
905912 $(call copycrosslib,$(@F ) )
913+ # Add basename symlinks for nested shared libs (.dylib, .so) in lib/$(@F)
914+ @if [ -d $( CURDIR) /_build/bindist/lib/targets/$( @F) /lib/$( @F) ] ; then \
915+ cd $(CURDIR ) /_build/bindist/lib/targets/$(@F ) /lib/$(@F ) ; \
916+ for lib in $$ (find . -mindepth 2 \( -name " *.dylib" -o -name " *.so" \) -type f) ; do \
917+ ln -sf " $$ lib" " $$ (basename " $$ lib" )" ; \
918+ done ; \
919+ fi
906920 # --help
907921 @cp -rfp driver/ghc-usage.txt _build/bindist/lib/targets/$(@F ) /lib/
908922 @cp -rfp driver/ghci-usage.txt _build/bindist/lib/targets/$(@F ) /lib/
You can’t perform that action at this time.
0 commit comments