Skip to content

Commit 8c9cd65

Browse files
committed
Fix unnecessary false in CLEANLIBS
1 parent cfa74dd commit 8c9cd65

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/mkmf.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2510,16 +2510,19 @@ def create_makefile(target, srcprefix = nil)
25102510
sodir = $extout ? '$(TARGET_SO_DIR)' : '$(RUBYARCHDIR)'
25112511
n = '$(TARGET_SO_DIR)$(TARGET)'
25122512
cleanobjs = ["$(OBJS)"]
2513+
cleanlibs = []
25132514
if $extmk
25142515
%w[bc i s].each {|ex| cleanobjs << "$(OBJS:.#{$OBJEXT}=.#{ex})"}
25152516
end
25162517
if target
25172518
config_string('cleanobjs') {|t| cleanobjs << t.gsub(/\$\*/, "$(TARGET)#{deffile ? '-$(arch)': ''}")}
2519+
cleanlibs << '$(TARGET_SO)'
25182520
end
2521+
config_string('cleanlibs') {|t| cleanlibs << t.gsub(/\$\*/) {n}}
25192522
conf << "\
25202523
TARGET_SO_DIR =#{$extout ? " $(RUBYARCHDIR)/" : ''}
25212524
TARGET_SO = $(TARGET_SO_DIR)$(DLLIB)
2522-
CLEANLIBS = #{'$(TARGET_SO) ' if target}#{config_string('cleanlibs') {|t| t.gsub(/\$\*/) {n}}}
2525+
CLEANLIBS = #{cleanlibs.join(' ')}
25232526
CLEANOBJS = #{cleanobjs.join(' ')} *.bak
25242527
TARGET_SO_DIR_TIMESTAMP = #{timestamp_file(sodir, target_prefix)}
25252528
" #"

0 commit comments

Comments
 (0)