summaryrefslogtreecommitdiff
path: root/ext/extmk.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/extmk.rb')
-rw-r--r--ext/extmk.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb
index 3ff15514d7..5e86078d7b 100644
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -105,8 +105,11 @@ getopts('', 'extstatic', 'make:', 'make-flags:')
$force_static = $OPT['extstatic'] == 'static'
$make = $OPT['make'] || $make
$mflags = Shellwords.shellwords($OPT['make-flags'] || "")
+$mflags[0].sub!(/^(?=\w+)$/, "-") unless mflags.empty?
+$make, *$mflags[0, 0] = Shellwords.shellwords($make)
mflags = $mflags.grep(/^-([^-].*)/) {$1}.join
+mflags.downcase! if $nmake == ?m
$continue = mflags.include?(?k)
$dryrun = mflags.include?(?n)