diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-07-08 17:28:29 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-12-05 17:09:49 +0900 |
commit | facb5cd4d5405dafabe0bd150f5dc56dc73aa96a (patch) | |
tree | 59029775d8c3fe8281246e4c4027820504561c2b | |
parent | f64718cb3211f0fabecd5a898f209eed2be9014b (diff) |
Clean compiler intermediate files more
-rw-r--r-- | common.mk | 2 | ||||
-rw-r--r-- | lib/mkmf.rb | 9 |
2 files changed, 9 insertions, 2 deletions
@@ -633,7 +633,7 @@ clear-installed-list: PHONY clean: clean-ext clean-enc clean-golf clean-docs clean-extout clean-local clean-platform clean-spec clean-local:: clean-runnable - $(Q)$(RM) $(OBJS) $(MINIOBJS) $(MAINOBJ) $(LIBRUBY_A) $(LIBRUBY_SO) $(LIBRUBY) $(LIBRUBY_ALIASES) + $(Q)$(RM) $(OBJS) $(MINIOBJS) $(INITOBJS) $(MAINOBJ) $(LIBRUBY_A) $(LIBRUBY_SO) $(LIBRUBY) $(LIBRUBY_ALIASES) $(Q)$(RM) $(PROGRAM) $(WPROGRAM) miniruby$(EXEEXT) dmyext.$(OBJEXT) dmyenc.$(OBJEXT) $(ARCHFILE) .*.time $(Q)$(RM) y.tab.c y.output encdb.h transdb.h config.log rbconfig.rb $(ruby_pc) $(COROUTINE_H:/Context.h=/.time) $(Q)$(RM) probes.h probes.$(OBJEXT) probes.stamp ruby-glommed.$(OBJEXT) ruby.imp ChangeLog $(STATIC_RUBY)$(EXEEXT) diff --git a/lib/mkmf.rb b/lib/mkmf.rb index fba1e678c7..e94733c635 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -2378,11 +2378,18 @@ TIMESTAMP_DIR = #{$extout && $extmk ? '$(extout)/.timestamp' : '.'} install_dirs.each {|d| conf << ("%-14s= %s\n" % d) if /^[[:upper:]]/ =~ d[0]} sodir = $extout ? '$(TARGET_SO_DIR)' : '$(RUBYARCHDIR)' n = '$(TARGET_SO_DIR)$(TARGET)' + cleanobjs = ["$(OBJS)"] + if $extmk + %w[bc i s].each {|ex| cleanobjs << "$(OBJS:.#{$OBJEXT}=.#{ex})"} + end + if target + config_string('cleanobjs') {|t| cleanobjs << t.gsub(/\$\*/, "$(TARGET)#{deffile ? '-$(arch)': ''}")} + end conf << "\ TARGET_SO_DIR =#{$extout ? " $(RUBYARCHDIR)/" : ''} TARGET_SO = $(TARGET_SO_DIR)$(DLLIB) CLEANLIBS = #{'$(TARGET_SO) ' if target}#{config_string('cleanlibs') {|t| t.gsub(/\$\*/) {n}}} -CLEANOBJS = *.#{$OBJEXT} #{config_string('cleanobjs') {|t| t.gsub(/\$\*/, "$(TARGET)#{deffile ? '-$(arch)': ''}")} if target} *.bak +CLEANOBJS = #{cleanobjs.join(' ')} *.bak TARGET_SO_DIR_TIMESTAMP = #{timestamp_file(sodir, target_prefix)} " #" |