* lib/mkmf.rb (create_makefile): move r40537 from extmk.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-09-04 03:54:23 +00:00
Родитель 970399a9ae
Коммит 50226fb61c
2 изменённых файлов: 2 добавлений и 9 удалений

Просмотреть файл

@ -244,14 +244,7 @@ def extmake(target)
end end
ok &&= File.open(makefile){|f| s = f.gets and !s[DUMMY_SIGNATURE]} ok &&= File.open(makefile){|f| s = f.gets and !s[DUMMY_SIGNATURE]}
ok = yield(ok) if block_given? ok = yield(ok) if block_given?
if ok unless 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
atomic_write_open(makefile) do |f| atomic_write_open(makefile) do |f|
f.puts "# " + DUMMY_SIGNATURE f.puts "# " + DUMMY_SIGNATURE
f.print(*dummy_makefile(CONFIG["srcdir"])) f.print(*dummy_makefile(CONFIG["srcdir"]))

Просмотреть файл

@ -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 CLEANOBJS = *.#{$OBJEXT} #{config_string('cleanobjs') {|t| t.gsub(/\$\*/, "$(TARGET)#{deffile ? '-$(arch)': ''}")} if target} *.bak
all: #{$extout ? "install" : target ? "$(DLLIB)" : "Makefile"} 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: all install static install-so install-rb
.PHONY: clean clean-so clean-static clean-rb .PHONY: clean clean-so clean-static clean-rb
" "