@@ -158,18 +158,17 @@ function _update_install_rpath(target, opt)
158
158
local bindir = target :bindir ()
159
159
local targetfile = path .join (bindir , target :filename ())
160
160
if target :policy (" install.rpath" ) then
161
- rpath_utils .clean (targetfile , {plat = target :plat (), arch = target :arch ()})
162
161
local result , sources = target :get_from (" rpathdirs" , " *" )
163
162
if result and sources then
164
163
for idx , rpathdirs in ipairs (result ) do
165
164
local source = sources [idx ]
166
165
local extraconf = target :extraconf_from (" rpathdirs" , source )
167
- if extraconf then
168
- for _ , rpathdir in ipairs ( rpathdirs ) do
169
- local extra = extraconf [ rpathdir ]
170
- if extra and extra . installonly then
171
- rpath_utils . insert ( targetfile , rpathdir , { plat = target : plat (), arch = target : arch ()})
172
- end
166
+ for _ , rpathdir in ipairs ( rpathdirs ) do
167
+ local extra = extraconf and extraconf [ rpathdir ] or nil
168
+ if extra and extra . installonly then
169
+ rpath_utils . insert ( targetfile , rpathdir , { plat = target : plat (), arch = target : arch ()})
170
+ else
171
+ rpath_utils . remove ( targetfile , rpathdir , { plat = target : plat (), arch = target : arch ()})
173
172
end
174
173
end
175
174
end
0 commit comments