summaryrefslogtreecommitdiff
path: root/template/fake.rb.in
diff options
context:
space:
mode:
Diffstat (limited to 'template/fake.rb.in')
-rw-r--r--template/fake.rb.in7
1 files changed, 6 insertions, 1 deletions
diff --git a/template/fake.rb.in b/template/fake.rb.in
index 524f6c8..542bc3c 100644
--- a/template/fake.rb.in
+++ b/template/fake.rb.in
@@ -42,4 +42,9 @@ srcdir = "<%=arg['srcdir']%>"
top_srcdir = File.realpath(srcdir, builddir)
fake = File.join(top_srcdir, "tool/fake.rb")
eval(File.read(fake), nil, fake)
-ENV["RUBYOPT"] = ["-r#{__FILE__}", ENV["RUBYOPT"]].compact.join(" ")
+ropt = "-r#{__FILE__}"
+["RUBYOPT"].each do |flag|
+ opt = ENV[flag]
+ opt = opt ? ([ropt] | opt.split).join(" ") : ropt
+ ENV[flag] = opt
+end