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.
16 lines
441 B
Ruby
16 lines
441 B
Ruby
env do |env|
|
|
env["build_root"] = env.build_root
|
|
env["inc_h"] = "inc.h"
|
|
|
|
env.Copy("copy_inc.h", "${inc_h}")
|
|
env.depends("program.o", "${inc_h}")
|
|
env.Object("program.o", "program.c")
|
|
env.Program("program.exe", ["program.o", "inc.c"])
|
|
|
|
inc_c = env.Command("inc.c",
|
|
[],
|
|
"CMD" => %w[ruby gen.rb ${_TARGET}],
|
|
"CMD_DESC" => "Generating")
|
|
inc_c.produces("inc.h")
|
|
end
|