Class | GNUMakefileParser::MkVariable |
In: |
../script/windows/gnumakefileparser.rb
|
Parent: | Object |
下記のように記述される変数定義.
objects = main.o command.o display.o # insert.o search.o
引数 var_rules に上記の書式の文字列を与えることで, それぞれ @var, @value, が設定される.
# File ../script/windows/gnumakefileparser.rb, line 199 199: def initialize(var_rules) 200: if var_rules =~ /^\s*(\w+)\s*(:?)(\??)\=\s*(.*)\s*$/ 201: @var = $1 202: @simply_expanded = $2 203: @conditional = $3 204: value = $4 205: @value = value.gsub(/[\t ]+/, ' ') 206: else 207: raise "Syntax Error" 208: end 209: end