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:
Adam Vandenberg 2010-01-30 22:48:44 -08:00
parent f9a0f3e80f
commit fb8707df4e

View File

@ -182,7 +182,7 @@ module HomebrewInreplaceExtension
# value with "new_value", or removes the definition entirely.
# See inreplace in utils.rb
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
end
def remove_make_var! flags