class Autorake::Preprocessor

Public Class Methods

new(incdirs, macros, *args) click to toggle source
# File lib/autorake/compile.rb, line 53
def initialize incdirs, macros, *args
  @incdirs = incdirs.map { |d| "-I#{d}" }
  @macros = macros.map { |k,v|
    next unless v
    m = "-D#{k}"
    m << "=#{v}" if String === v
    m
  }
  @args = args
  e = ENV[ "CFLAGS"]
  @cflags = e.split if e
end

Public Instance Methods

build(obj, src) click to toggle source
Calls superclass method Autorake::Builder#build
# File lib/autorake/compile.rb, line 66
def build obj, src
  io = [ "-o", obj.to_s, "-c", src.to_s]
  super @cflags, @macros, @incdirs, @args, opt_E, io
end

Private Instance Methods

opt_E() click to toggle source
# File lib/autorake/compile.rb, line 73
def opt_E
  "-E"
end