@@ -42,43 +42,52 @@ file_preparation: always
42
42
# /usr/local/opt/icu4c/lib/libicudata.69.dylib (compatibility version 69.0.0, current version 69.1.0)
43
43
# $ otool -L M2-binary | grep libicudata
44
44
# $
45
- # I've install the "library $f not copied" error below to catch this.
45
+ # I've installed the "library $f not copied" error below to catch this.
46
46
# I'm working around this temporarily by renaming some dylib files to disable linking with them:
47
47
# $ find /usr/local -name \*dylib---- -ls
48
48
# 2071418 0 lrwxrwxr-x 1 brew admin 50 Jul 31 12:49 /usr/local/lib/libboost_regex-mt.dylib---- -> ../Cellar/boost/1.76.0/lib/libboost_regex-mt.dylib
49
49
# 6329913 0 lrwxrwxr-x 1 brew admin 19 Jul 28 03:12 /usr/local/Cellar/gcc/11.2.0/lib/gcc/11/libgfortran.dylib---- -> libgfortran.5.dylib
50
50
# 6331397 0 lrwxrwxr-x 1 brew admin 19 Jul 28 03:12 /usr/local/Cellar/gcc/11.2.0/lib/gcc/11/libquadmath.dylib---- -> libquadmath.0.dylib
51
+ # Now I'm not doing that any longer, but have descended one level further with "otool -L".
51
52
52
53
53
54
library_preparation : file_preparation
54
55
55
56
$(MKDIR_P) files/@package@/@tail_libdir@
56
57
57
- ( \
58
- for i in files/@package@/@tail_bindir@/* ; \
59
- do if [ -f $$i -a -x $$i -a ! -h $$i ] ; \
60
- then otool -L $$i | grep '^\t' | grep -v '^[[:space:]]*\(/usr/lib/\|/System/Library/\)' \
61
- | sed 's/^[[:space:]]*\(.*\) (compatibility version .*/\1/' \
62
- | while read f; \
63
- do (b=`basename $$f` ; set -xe ; install_name_tool -change $$f @executable_path/../lib/$$b $$i ) || exit 1 ; \
64
- echo $$f ; \
65
- done ; \
66
- fi ; \
67
- done ; \
68
- for i in files/@package@/@tail_programsdir@/* ; \
69
- do if [ -f $$i -a -x $$i -a ! -h $$i ] ; \
70
- then otool -L $$i | grep '^\t' | grep -v '^[[:space:]]*\(/usr/lib/\|/System/Library/\)' \
71
- | sed 's/^[[:space:]]*\(.*\) (compatibility version .*/\1/' \
72
- | while read f; \
73
- do (b=`basename $$f` ; set -xe ; install_name_tool -change $$f @executable_path/../../../lib/$$b $$i ) || exit 1 ; \
74
- echo $$f ; \
75
- done ; \
76
- fi ; \
77
- done \
78
- ) | sort \
79
- | uniq \
58
+ ( \
59
+ for i in files/@package@/@tail_bindir@/* files/@package@/@tail_programsdir@/* ; \
60
+ do if [ -f $$i -a -x $$i -a ! -h $$i ] ; \
61
+ then otool -L $$i | grep '^\t' | grep -v '^[[:space:]]*\(/usr/lib/\|/System/Library/\)' \
62
+ | sed 's/^[[:space:]]*\(.*\) (compatibility version .*/\1/' \
63
+ | while read f; \
64
+ do (b=`basename $$f` ; set -xe ; install_name_tool -change $$f @executable_path/../lib/$$b $$i ) || exit 1 ; \
65
+ echo $$f ; \
66
+ @INSTALL_PROGRAM@ $$f files/@package@/@tail_libdir@ ; \
67
+ if echo $$f | grep '^[^@].*\.dylib$$' ; \
68
+ then otool -L $$f \
69
+ | grep '^\t' \
70
+ | grep -v '^[[:space:]]*\(@\|/usr/lib/\|/System/Library/\)' \
71
+ | sed 's/^[[:space:]]*\(.*\) (compatibility version .*/\1/' \
72
+ | while read ff; \
73
+ do (bb=`basename $$ff` ; \
74
+ set -xe ; \
75
+ install_name_tool -change $$ff @executable_path/../lib/$$bb files/@package@/@tail_libdir@/`basename $$f` \
76
+ ) || exit 1 ; \
77
+ echo $$ff ; \
78
+ done ; \
79
+ fi ; \
80
+ done ; \
81
+ fi ; \
82
+ done \
83
+ ) | sort \
84
+ | uniq \
80
85
| while read f; do ls -l $$f ; (set -x ; @INSTALL_PROGRAM@ $$f files/@package@/@tail_libdir@ ) ; done
81
86
87
+ # yes, the next two lines are a hack.
88
+ @INSTALL_PROGRAM@ /usr/local/Cellar/gcc/12.2.0/lib/gcc/12/libquadmath.0.dylib files/@package@/@tail_libdir@
89
+ @INSTALL_PROGRAM@ /usr/local/Cellar/gcc/12.2.0/lib/gcc/12/libgcc_s.1.1.dylib files/@package@/@tail_libdir@
90
+
82
91
for i in files/@package@/@tail_libdir@/* ; \
83
92
do if [ -f $$i -a -x $$i -a ! -h $$i ] ; \
84
93
then otool -L $$i | grep '^\t' | grep -v '^[[:space:]]*\(/usr/lib/\|/System/Library/\)' \
0 commit comments