aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xext/extmk.rb9
-rw-r--r--lib/mkmf.rb2
2 files changed, 2 insertions, 9 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb
index 712272064f..d8e9e86c0f 100755
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -244,14 +244,7 @@ def extmake(target)
end
ok &&= File.open(makefile){|f| s = f.gets and !s[DUMMY_SIGNATURE]}
ok = yield(ok) if block_given?
- if ok
- open(makefile, "r+b") do |f|
- s = f.read.sub!(/^(static:)\s(?!all\b).*/, '\1 all') or break
- f.rewind
- f.print(s)
- f.truncate(f.pos)
- end unless $static
- else
+ unless ok
atomic_write_open(makefile) do |f|
f.puts "# " + DUMMY_SIGNATURE
f.print(*dummy_makefile(CONFIG["srcdir"]))
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index c2b6c903bf..9e700fb546 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -2296,7 +2296,7 @@ CLEANLIBS = #{n}.#{CONFIG['DLEXT']} #{config_string('cleanlibs') {|t| t.gsub
CLEANOBJS = *.#{$OBJEXT} #{config_string('cleanobjs') {|t| t.gsub(/\$\*/, "$(TARGET)#{deffile ? '-$(arch)': ''}")} if target} *.bak
all: #{$extout ? "install" : target ? "$(DLLIB)" : "Makefile"}
-static: $(STATIC_LIB)#{$extout ? " install-rb" : ""}
+static: #{$extmk && !$static ? "all" : "$(STATIC_LIB)#{!$extmk ? " install-rb" : ""}"}
.PHONY: all install static install-so install-rb
.PHONY: clean clean-so clean-static clean-rb
"