summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--ext/extmk.rb9
-rw-r--r--lib/mkmf.rb4
3 files changed, 14 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index aa3b419a46..b5f14cf30f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
* ext/socket/socket.c (constant_arg): constified.
diff --git a/ext/extmk.rb b/ext/extmk.rb
index be3ad8d248..406695f9da 100644
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -137,18 +137,17 @@ def extmake(target)
begin
$extconf_h = nil
ok &&= extract_makefile(makefile)
+ conf = ["#{$srcdir}/makefile.rb", "#{$srcdir}/extconf.rb"].find {|f| File.exist?(f)}
if (($extconf_h && !File.exist?($extconf_h)) ||
!(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
ok = false
init_mkmf
Logging::logfile 'mkmf.log'
rm_f makefile
- if File.exist?($0 = "#{$srcdir}/makefile.rb")
- load $0
- elsif File.exist?($0 = "#{$srcdir}/extconf.rb")
- load $0
+ if conf
+ load $0 = conf
else
create_makefile(target)
end
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 5686f8137b..e9d509ec39 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -1721,7 +1721,9 @@ site-install-rb: install-rb
sep = config_string('BUILD_FILE_SEPARATOR') {|s| ":/=#{s}" if s != "/"} || ""
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@-$(MAKEDIRS) $(@D)\n" if $extout
link_so = LINK_SO.gsub(/^/, "\t")