Remove spaces around make-style variables.
Removing the spaces around equals for make-style variables makes the change_make_var! method compatible with shell scripts as well as makefiles.
This commit is contained in:
parent
f9a0f3e80f
commit
fb8707df4e
@ -182,7 +182,7 @@ module HomebrewInreplaceExtension
|
|||||||
# value with "new_value", or removes the definition entirely.
|
# value with "new_value", or removes the definition entirely.
|
||||||
# See inreplace in utils.rb
|
# See inreplace in utils.rb
|
||||||
def change_make_var! flag, new_value
|
def change_make_var! flag, new_value
|
||||||
new_value = "#{flag} = #{new_value}" unless new_value.to_s.empty?
|
new_value = "#{flag}=#{new_value}" unless new_value.to_s.empty?
|
||||||
gsub! Regexp.new("^#{flag}\\s*=.*$"), new_value.to_s
|
gsub! Regexp.new("^#{flag}\\s*=.*$"), new_value.to_s
|
||||||
end
|
end
|
||||||
def remove_make_var! flags
|
def remove_make_var! flags
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user