* ext/extmk.rb (extmake): does not use both of makefile.rb and

extconf.rb at the same time.

* lib/mkmf.rb (DLLIB): depends on Makefile.  [ruby-core:21096]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-01-04 02:11:33 +00:00
parent 9ac6838183
commit a7999ab13c
3 changed files with 14 additions and 6 deletions

View File

@ -1,3 +1,10 @@
Sun Jan 4 11:11:31 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/extmk.rb (extmake): does not use both of makefile.rb and
extconf.rb at the same time.
* lib/mkmf.rb (DLLIB): depends on Makefile. [ruby-core:21096]
Sun Jan 4 09:27:41 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> Sun Jan 4 09:27:41 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/socket/socket.c (constant_arg): constified. * ext/socket/socket.c (constant_arg): constified.

View File

@ -137,18 +137,17 @@ def extmake(target)
begin begin
$extconf_h = nil $extconf_h = nil
ok &&= extract_makefile(makefile) ok &&= extract_makefile(makefile)
conf = ["#{$srcdir}/makefile.rb", "#{$srcdir}/extconf.rb"].find {|f| File.exist?(f)}
if (($extconf_h && !File.exist?($extconf_h)) || if (($extconf_h && !File.exist?($extconf_h)) ||
!(t = modified?(makefile, MTIMES)) || !(t = modified?(makefile, MTIMES)) ||
["#{$srcdir}/makefile.rb", "#{$srcdir}/extconf.rb", "#{$srcdir}/depend"].any? {|f| modified?(f, [t])}) [conf, "#{$srcdir}/depend"].any? {|f| modified?(f, [t])})
then then
ok = false ok = false
init_mkmf init_mkmf
Logging::logfile 'mkmf.log' Logging::logfile 'mkmf.log'
rm_f makefile rm_f makefile
if File.exist?($0 = "#{$srcdir}/makefile.rb") if conf
load $0 load $0 = conf
elsif File.exist?($0 = "#{$srcdir}/extconf.rb")
load $0
else else
create_makefile(target) create_makefile(target)
end end

View File

@ -1721,7 +1721,9 @@ site-install-rb: install-rb
sep = config_string('BUILD_FILE_SEPARATOR') {|s| ":/=#{s}" if s != "/"} || "" sep = config_string('BUILD_FILE_SEPARATOR') {|s| ":/=#{s}" if s != "/"} || ""
mfile.print "$(RUBYARCHDIR)/" if $extout mfile.print "$(RUBYARCHDIR)/" if $extout
mfile.print "$(DLLIB): ", (makedef ? "$(DEFFILE) " : ""), "$(OBJS)\n" mfile.print "$(DLLIB): "
mfile.print "$(DEFFILE) " if makedef
mfile.print "$(OBJS) Makefile\n"
mfile.print "\t@-$(RM) $(@#{sep})\n" mfile.print "\t@-$(RM) $(@#{sep})\n"
mfile.print "\t@-$(MAKEDIRS) $(@D)\n" if $extout mfile.print "\t@-$(MAKEDIRS) $(@D)\n" if $extout
link_so = LINK_SO.gsub(/^/, "\t") link_so = LINK_SO.gsub(/^/, "\t")