summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--ext/extmk.rb1
-rw-r--r--lib/mkmf.rb7
3 files changed, 8 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index d1c94cb577..57c7effa45 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sun Oct 5 23:34:28 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/mkmf.rb ($config_h): now always defines for old libraries.
+
Sun Oct 5 23:06:55 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* vm_method.c (rb_mod_modfunc): method undefined in included module
diff --git a/ext/extmk.rb b/ext/extmk.rb
index ac497bbf20..be3ad8d248 100644
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -343,7 +343,6 @@ unless CROSS_COMPILING
ENV["RUBYLIB"] = "-"
ENV["RUBYOPT"] = "-r#{File.expand_path('ext/purelib.rb', $top_srcdir)}"
end
-$config_h = '$(arch_hdrdir)/ruby/config.h'
$mflags << "ruby=#$ruby"
MTIMES = [__FILE__, 'rbconfig.rb', srcdir+'/lib/mkmf.rb'].collect {|f| File.mtime(f)}
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 87a0cdf873..76692f187f 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -13,7 +13,8 @@ if /mswin|bccwin|mingw|os2/ !~ CONFIG['build_os']
CXX_EXT.concat(%w[C])
end
SRC_EXT = %w[c m] << CXX_EXT
-$static = $config_h = nil
+$static = nil
+$config_h = '$(arch_hdrdir)/ruby/config.h'
$default_static = $static
unless defined? $configure_args
@@ -1441,7 +1442,7 @@ def depend_rules(depend)
end
depend.each_line do |line|
line.gsub!(/\.o\b/, ".#{$OBJEXT}")
- line.gsub!(/\$\((?:hdr|top)dir\)\/config.h/, $config_h) if $config_h
+ line.gsub!(/\$\((?:hdr|top)dir\)\/config.h/, $config_h)
line.gsub!(%r"\$\(hdrdir\)/(?!ruby(?![^:;/\s]))(?=[-\w]+\.h)", '\&ruby/')
if $nmake && /\A\s*\$\(RM|COPY\)/ =~ line
line.gsub!(%r"[-\w\./]{2,}"){$&.tr("/", "\\")}
@@ -1742,7 +1743,7 @@ site-install-rb: install-rb
if RULE_SUBST
headers.each {|h| h.sub!(/.*/, &RULE_SUBST.method(:%))}
end
- headers << $config_h if $config_h
+ headers << $config_h
headers << '$(RUBY_EXTCONF_H)' if $extconf_h
mfile.print "$(OBJS): ", headers.join(' '), "\n"
end