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 | 551d43dbeea9af1d65e800e96336aec2c82e4227 (patch) | |
| tree | 56c2f509529faebbfa758168bba580e7e4d1e0ce /ext | |
| parent | a36475b28c98c2909444e4c5b219ab5147d5c8ae (diff) | |
| download | ruby-551d43dbeea9af1d65e800e96336aec2c82e4227.tar.gz ruby-551d43dbeea9af1d65e800e96336aec2c82e4227.tar.xz ruby-551d43dbeea9af1d65e800e96336aec2c82e4227.zip | |
* 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: http://svn.ruby-lang.org/repos/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 db4bdf3ce..d7d4d2fbd 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 |
