Add ability to record side-effect file production - close #43

This commit is contained in:
josh committed 2017-07-14 16:17:01 -04:00
1 parent 45e30662d2
commit 6d04500c13
4 files changed
+56 -11

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
Rscons::Environment.new do |env|
env["build_root"] = env.build_root
env["inc_h"] = "inc.h"
env.Copy("copy_inc.h", "${inc_h}")
env.depends("${build_root}/program.o", "${inc_h}")
env.Program("program.exe", ["program.c", "inc.c"])
env.Command("inc.c",
[],
"CMD" => %w[ruby gen.rb ${_TARGET}],
"CMD_DESC" => "Generating")
env.produces("inc.c", "inc.h")
end