summaryrefslogtreecommitdiff
path: root/template/fake.rb.in
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-24 07:20:28 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-24 07:20:28 (GMT)
commitee1cfc11e33f205bdbfc569414da6f388d9f58d8 (patch)
tree57c31464087068ff3bf16094251990de1cfc4517 /template/fake.rb.in
parent02efdb484582dfc0b785a5d7f07d69333a262943 (diff)
* template/fake.rb.in: no need for hook if extmk.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'template/fake.rb.in')
-rwxr-xr-xtemplate/fake.rb.in26
1 files changed, 14 insertions, 12 deletions
diff --git a/template/fake.rb.in b/template/fake.rb.in
index 827fa67..e47cb4d 100755
--- a/template/fake.rb.in
+++ b/template/fake.rb.in
@@ -18,17 +18,6 @@ if RUBY_PLATFORM =~ /mswin|bccwin|mingw/
end
$:.unshift(File.expand_path("..", __FILE__))
-prehook = proc do
- config = RbConfig::CONFIG
- mkconfig = RbConfig::MAKEFILE_CONFIG
- mkconfig["top_srcdir"] = $top_srcdir = File.expand_path("@abs_top_srcdir@")
- mkconfig["rubyhdrdir"] = "$(top_srcdir)/include"
- mkconfig["builddir"] = config["builddir"] = File.expand_path(File.dirname(__FILE__))
- config["rubyhdrdir"] = File.join(mkconfig["top_srcdir"], "include")
- mkconfig["libdir"] = config["libdir"] = mkconfig["topdir"]
- untrace_var(:$extmk, prehook)
-end
-trace_var(:$extmk, prehook)
posthook = proc do
config = RbConfig::CONFIG
mkconfig = RbConfig::MAKEFILE_CONFIG
@@ -37,4 +26,17 @@ posthook = proc do
$ruby = baseruby
untrace_var(:$ruby, posthook)
end
-trace_var(:$ruby, posthook)
+prehook = proc do |extmk|
+ unless extmk
+ config = RbConfig::CONFIG
+ mkconfig = RbConfig::MAKEFILE_CONFIG
+ mkconfig["top_srcdir"] = $top_srcdir = File.expand_path("@abs_top_srcdir@")
+ mkconfig["rubyhdrdir"] = "$(top_srcdir)/include"
+ mkconfig["builddir"] = config["builddir"] = File.expand_path(File.dirname(__FILE__))
+ config["rubyhdrdir"] = File.join(mkconfig["top_srcdir"], "include")
+ mkconfig["libdir"] = config["libdir"] = mkconfig["topdir"]
+ trace_var(:$ruby, posthook)
+ end
+ untrace_var(:$extmk, prehook)
+end
+trace_var(:$extmk, prehook)