# File lib/makeconf/makefile.rb, line 168 def ifeq(condvar, conds) check = conds.clone if @append == true op = '+= ' else op = '=' end default = nil if check.has_key?(:default) default = check[:default].clone check.delete :default end keys = check.keys.sort k0 = keys.shift @buf.push "ifeq (#{condvar},#{k0})" @buf.push "#{@lval}#{op}#{check[k0]}" keys.each do |k| @buf.push "else ifeq (#{condvar},#{k})" @buf.push "#{@lval}#{op}#{check[k]}" end unless default.nil? and default != '' @buf.push "else" @buf.push "#{@lval}#{op}#{default}" end @buf.push "endif" return self end
Generated with the Darkfish Rdoc Generator 2.