Use regexp matching to parse NAME=VALUE pairs given as command line arguments
...rather then using `split('=")`.
--- a/rakelib/support.rb Sun May 22 01:13:00 2016 +0100
+++ b/rakelib/support.rb Sun May 22 01:14:35 2016 +0100
@@ -1,16 +1,21 @@
+# Following hack is required to allow passing variable
+# values in `make` style, i.e., to allow for
+#
+# rake PROJECT=stx:jv-branch compile
+#
+ARGV.each do | arg |
+ name_and_value = /^([A-Za-z_]+)\w*=(.*)/.match(arg)
+ if name_and_value
+ self.class.const_set(name_and_value[1], name_and_value[2])
+ end
+end
+
module Rake
end
module Rake::StX
end
-ARGV.each do | arg |
- if arg =~ /[A-Za-z_]\w*=[^=]*/
- name_and_value = arg.split('=')
- self.class.const_set(name_and_value[0], name_and_value[1])
- end
-end
-
require 'rakelib/extensions.rb'
require 'rakelib/rbspec.rb'
require 'rakelib/vcs.rb'