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 | 2f9211eaa9d6844a3f8777587212804d70d82a18 (patch) | |
| tree | 76b0906aec83dab16ede52a468df1d9ae60c1fbc /ext | |
| parent | 3e6f9cad3bea9d66eb2103a7571e1d2b05ca5181 (diff) | |
| download | ruby-2f9211eaa9d6844a3f8777587212804d70d82a18.tar.gz ruby-2f9211eaa9d6844a3f8777587212804d70d82a18.tar.xz ruby-2f9211eaa9d6844a3f8777587212804d70d82a18.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/branches/ruby_1_8@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 5bbed957c..05d9c26e5 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 $hdrdir = $top_srcdir = top_srcdir + Config::CONFIG["topdir"] = topdir + CONFIG["srcdir"] = mk_srcdir + CONFIG["topdir"] = mk_topdir + CONFIG.delete("hdrdir") $topdir = topdir Dir.chdir dir end |
