Rebuilding a "build-info" module every time an exe is produced

I did look at dune-build-info but it’s not enough info.

Yup! It does seem like specifying (deps (universe)) as for my rule solves the problem. Repeating the whole thing:

(rule
  (deps (universe))
  (target build_info_gen.ml)
  (action (run ocaml %{dep:../scripts/gen_build_info.ml})))

When I build and run twice with no changes in between:

mbac@beaver$ dune build ./mymain.exe
mbac@beaver$ ./mymain.exe -build-info | sexp pp
((git_revision     095e463-dirty)
 (build_user       mbac)
 (build_host       beaver)
 (build_time       "Sun Jan  5 13:38:54 PST 2020")
 (ocamlopt_version 4.08.1))
mbac@beaver$ dune build ./mymain.exe
mbac@beaver$ ./mymain.exe -build-info | sexp pp
((git_revision     095e463-dirty)
 (build_user       mbac)
 (build_host       beaver)
 (build_time       "Sun Jan  5 13:39:03 PST 2020")
 (ocamlopt_version 4.08.1))

Note the build time baked into the .exe changes.

w00t! Thanks!