- (* If no initial target set on the command line, find
- * the first goal in the file.
- *)
- List.iter (
- function
- | Ast.Goal (name, [], _, _, _) ->
- if !initial_targets = [] then
- initial_targets := Ast.ECall (name, []) :: !initial_targets
- | Ast.Goal (name, _, _, _, _) ->
- if !initial_targets = [] then
- failwithf "%s: first target ā%sā has parameters and so cannot be used as the default target"
- filename name
- | _ -> ()
- ) file;
+ (* Construct the dependency DAG with the root(s) being the targets. *)
+ let dag = Deps.create env targets in