diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-04-07 14:59:24 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-04-07 14:59:24 +0000 |
commit | 9ea857d7ee2ee9ccb8527751c27422f6dbc9a87b (patch) | |
tree | 56c2f509529faebbfa758168bba580e7e4d1e0ce /ext | |
parent | 138b4c427c2c8761eae0e63e01fc05768a7a9a2a (diff) | |
download | ruby-9ea857d7ee2ee9ccb8527751c27422f6dbc9a87b.tar.gz |
* ext/extmk.rb (extmake): keep directory names in Makefile as macros.
* lib/mkmf.rb (configuration, create_makefile): ditto.
* lib/mkmf.rb (CXX_EXT): separate C++ extensions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/extmk.rb | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb index db4bdf3ce0..d7d4d2fbd2 100644 --- a/ext/extmk.rb +++ b/ext/extmk.rb @@ -102,6 +102,8 @@ def extmake(target) Dir.chdir target top_srcdir = $top_srcdir topdir = $topdir + mk_srcdir = CONFIG["srcdir"] + mk_topdir = CONFIG["topdir"] prefix = "../" * (target.count("/")+1) $hdrdir = $top_srcdir = relative_from(top_srcdir, prefix) $topdir = prefix + $topdir @@ -115,6 +117,9 @@ def extmake(target) unless $ignore Config::CONFIG["srcdir"] = $srcdir Config::CONFIG["topdir"] = $topdir + CONFIG["hdrdir"] = ($hdrdir == top_srcdir) ? top_srcdir : "$(topdir)/"+top_srcdir + CONFIG["srcdir"] = "$(hdrdir)/ext/#{$mdir}" + CONFIG["topdir"] = $topdir begin if (!(ok &&= extract_makefile(makefile)) || !(t = modified?(makefile, MTIMES)) || @@ -140,14 +145,12 @@ def extmake(target) rm_f "conftest*" config = $0 $0 = $PROGRAM_NAME - Config::CONFIG["srcdir"] = $top_srcdir - Config::CONFIG["topdir"] = topdir end end ok = yield(ok) if block_given? unless ok open(makefile, "w") do |f| - f.print dummy_makefile($srcdir) + f.print dummy_makefile(CONFIG["srcdir"]) end return true end @@ -175,6 +178,10 @@ def extmake(target) end ensure Config::CONFIG["srcdir"] = $top_srcdir + Config::CONFIG["topdir"] = topdir + CONFIG["srcdir"] = mk_srcdir + CONFIG["topdir"] = mk_topdir + CONFIG.delete("hdrdir") $hdrdir = $top_srcdir = top_srcdir $topdir = topdir Dir.chdir dir |