19 lines
339 B
Plaintext
19 lines
339 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)
|
|
env.MySource('inc.h', [])
|
|
env.Program('program.exe', Dir['*.c'])
|
|
end
|
|
end
|