feat(rule): chain rules and depend on the tool they run

This commit is contained in:
sneeker committed 2022-08-04 15:59:54 +00:00
1 parent 034095ceac
commit c8048c6213
2 files changed
+34 -23

No files matched your search

+2 -2
View File
@@ -113,8 +113,8 @@ let of_project p =
(fun r ->
let cmd = Array.of_list r.rcmd in
(* a tool the rule runs is an input like any other, so building it first is
ordering and rebuilding it is invalidation *)
let tools = List.filter_map (fun u -> Option.map (out_of p) (find p u)) r.ruses in
ordering and rebuilding it is invalidation; a script is already a file *)
let tools = List.map (fun u -> match find p u with Some t -> out_of p t | None -> u) r.ruses in
add
(Graph.make ~id:!n ~tag:"gen" ~label:r.rdesc ~cmd ~outs:r.routs ~ins:(r.rin @ tools) ()))
p.rules;