summaryrefslogtreecommitdiffstats
path: root/ext/extmk.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-05-25 23:44:08 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-05-25 23:44:08 +0000
commit0c03356f4d0d4956c2e06386b4b731e955e39814 (patch)
tree2f031fe1cdd638ce9e6f6565316148b15ac332e2 /ext/extmk.rb
parent543820113c99e05ecee4e9b5636efc1424310947 (diff)
downloadruby-0c03356f4d0d4956c2e06386b4b731e955e39814.tar.gz
ruby-0c03356f4d0d4956c2e06386b4b731e955e39814.tar.xz
ruby-0c03356f4d0d4956c2e06386b4b731e955e39814.zip
* ruby.h, lib/mkmf.rb (create_header): clear command line options for
macros moved to extconf.h. * ext/extmk.rb (extract_makefile, extmk): made RUBY_EXTCONF_H and EXTSTATIC permanent. * ext/{dbm,digest/*,socket,zlib}/extconf.rb: used $defs and $INCFLAGS. * {bcc32,win32,wince}/Makefile.sub (COMPILE_C, COMPILE_CXX): added $(INCFLAGS). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/extmk.rb')
-rw-r--r--ext/extmk.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb
index bb32e82f1..706648557 100644
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -69,6 +69,8 @@ def extract_makefile(makefile, keep = true)
return false
end
$target = target
+ $extconf_h = m[/^RUBY_EXTCONF_H[ \t]*=[ \t]*(\S+)/, 1]
+ $static = m[/^EXTSTATIC[ \t]*=[ \t]*(\S+)/, 1] || false
/^STATIC_LIB[ \t]*=[ \t]*\S+/ =~ m or $static = nil
$preload = Shellwords.shellwords(m[/^preload[ \t]*=[ \t]*(.*)/, 1] || "")
$DLDFLAGS += " " + (m[/^DLDFLAGS[ \t]*=[ \t]*(.*)/, 1] || "")
@@ -90,6 +92,7 @@ def extmake(target)
else
$static = false
end
+ $default_static = $static
unless $ignore
return true if $nodynamic and not $static
@@ -122,10 +125,13 @@ def extmake(target)
CONFIG["srcdir"] = "$(hdrdir)/ext/#{$mdir}"
CONFIG["topdir"] = $topdir
begin
- if (!(ok &&= extract_makefile(makefile)) ||
+ $extconf_h = nil
+ ok &&= extract_makefile(makefile)
+ if (($extconf_h && !File.exist?($extconf_h)) ||
!(t = modified?(makefile, MTIMES)) ||
%W"#{$srcdir}/makefile.rb #{$srcdir}/extconf.rb #{$srcdir}/depend".any? {|f| modified?(f, [t])})
then
+ $default_static = $static
ok = false
init_mkmf
Logging::logfile 'mkmf.log'