summaryrefslogtreecommitdiff
path: root/instruby.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-30 10:16:53 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-30 10:16:53 +0000
commitfb0b931709d92ccfe3ac1bfe2f883cf36eda9e20 (patch)
tree0426b7cbae13dc413203200a97f253cd59c645c2 /instruby.rb
parent20d146389cd347cf51a7ba5ab8f1795985357a3a (diff)
* ext/extmk.rb: split --make argument contains options, assume
the first word of --make-flags is always options even unless preceeded by -, and ignore letter-case of options if nmake. * instruby.rb: extract -n option also from --make and --make-flags. * bcc32/Makefile.sub, win32/Makefile.sub: not prepend - to $(MFLAGS) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'instruby.rb')
-rw-r--r--instruby.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/instruby.rb b/instruby.rb
index 4e82a35b91..c07a3ff56d 100644
--- a/instruby.rb
+++ b/instruby.rb
@@ -12,9 +12,13 @@ File.umask(0)
getopts("n", "make:", "make-flags:")
$dryrun = $OPT["n"]
-Shellwords.shellwords($OPT["make-flags"] || "").grep(/^-[^-]*n/) do
- break $dryrun = true
-end
+mflags = Shellwords.shellwords($OPT["make-flags"] || "")
+mflags[0].sub!(/^(?=\w+)$/, "-") unless mflags.empty?
+make, *mflags[0, 0] = Shellwords.shellwords($OPT['make'] || ENV["MAKE"] || "")
+mflags = mflags.grep(/^-[^-]*/) {$1}.join
+mflags.downcase! if /nmake/i == make
+$dryrun = true if mflags.include?(?n)
+
ARGV.delete_if{|x|x[0] == ?-}
destdir = ARGV[0] || ''