summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/extmk.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb
index 876433d280..3ff15514d7 100644
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -1,4 +1,4 @@
-#! /usr/local/bin/ruby -s
+#! /usr/local/bin/ruby
# -*- ruby -*-
$force_static = nil
@@ -102,15 +102,11 @@ require 'getopts'
getopts('', 'extstatic', 'make:', 'make-flags:')
-$force_static = $OPT['extstatic']
+$force_static = $OPT['extstatic'] == 'static'
$make = $OPT['make'] || $make
$mflags = Shellwords.shellwords($OPT['make-flags'] || "")
-if mflags = ENV["MAKEFLAGS"]
- mflags, = mflags.split(nil, 2)
-else
- mflags = ENV["MFLAGS"] || ""
-end
+mflags = $mflags.grep(/^-([^-].*)/) {$1}.join
$continue = mflags.include?(?k)
$dryrun = mflags.include?(?n)