summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2022-11-16 11:43:52 +0900
committerNobuyoshi Nakada <[email protected]>2022-11-16 18:42:46 +0900
commitdc1c4e46758ace2c9e5e822df0d64b16bb564bb4 ()
treef87f9cf03c9489bf76643d6d7a7fd7bbb39dffc3
parentbe65cf53253fa955cd4016459b3add3ba6046837 (diff)
Clean extension build directories and exts.mk file
Notes: Merged: https://.com/ruby/ruby/pull/6741
-rwxr-xr-xext/extmk.rb10
1 files changed, 8 insertions, 2 deletions
@@ -722,6 +722,7 @@ begin
mf.puts "ECHO = $(ECHO1:0=@echo)"
mf.puts "MFLAGS = -$(MAKEFLAGS)" if $nmake
mf.puts "override MFLAGS := $(filter-out -j%,$(MFLAGS))" if $gnumake
mf.puts
def mf.macro(name, values, max = 70)
@@ -764,6 +765,7 @@ begin
mf.macro "SUBMAKEOPTS", submakeopts
mf.macro "NOTE_MESG", %w[$(RUBY) $(top_srcdir)/tool/lib/colorize.rb skip]
mf.macro "NOTE_NAME", %w[$(RUBY) $(top_srcdir)/tool/lib/colorize.rb fail]
mf.puts
targets = %w[all install static install-so install-rb clean distclean realclean]
targets.each do |tgt|
@@ -798,16 +800,20 @@ begin
exts.each do |d|
d = d[0..-2]
t = "#{d}#{tgt}"
- if /^(dist|real)?clean$/ =~ tgt
deps = exts.select {|e|e.start_with?(d)}.map {|e|"#{e[0..-2]}#{tgt}"} - [t]
- pd = ' ' + deps.join(' ') unless deps.empty?
else
pext = File.dirname(d)
pd = " #{pext}/#{tgt}" if exts.include?("#{pext}/.")
end
mf.puts "#{t}:#{pd}\n\t$(Q)#{submake} $(MFLAGS) V=$(V) $(@F)"
end
end
mf.puts "\n""extso:\n"
mf.puts "\t@echo EXTSO=$(EXTSO)"