19 lines
343 B
Plaintext

class MySource < Rscons::Builder
def run(target, sources, cache, env, vars)
File.open(target, 'w') do |fh|
fh.puts <<EOF
#define THE_VALUE 5678
EOF
end
target
end
end
build do
Environment.new do |env|
env.add_builder(MySource.new)
env.MySource('inc.h', [])
env.Program('program.exe', Dir['*.c'])
end
end