Add env() method to create environments. Process all environments created at build script top level before executing any autoconf-enabled tasks, or if no tasks are specified by the user.
17 lines
277 B
Plaintext
17 lines
277 B
Plaintext
class MySource < Rscons::Builder
|
|
def run(options)
|
|
File.open(@target, 'w') do |fh|
|
|
fh.puts <<EOF
|
|
#define THE_VALUE 5678
|
|
EOF
|
|
end
|
|
true
|
|
end
|
|
end
|
|
|
|
env do |env|
|
|
env.add_builder(MySource)
|
|
env.MySource('inc.h', [])
|
|
env.Program('program.exe', Dir['*.c'])
|
|
end
|