dune 901 B

12345678910111213141516171819202122232425262728293031323334353637
  1. ; https://discuss.ocaml.org/t/dune-how-to-link-statically-on-linux-not-on-others/8537/4?u=mro
  2. (rule
  3. (with-stdout-to
  4. flags.sexp
  5. (run sh %{dep:gen_flags.sh})))
  6. (rule
  7. (with-stdout-to
  8. version.ml
  9. ; (run echo "let dune_project_num = \"%{version:seppo}\"")
  10. (run sh %{dep:gen_version.sh} "%{version:seppo}" # ${build-number}) ; https://github.com/ocaml/dune/issues/255#issuecomment-372077123
  11. ))
  12. (rule
  13. (target res.ml)
  14. (deps
  15. (source_tree ../res))
  16. (action
  17. (with-stdout-to
  18. %{target}
  19. (run ocaml-crunch --mode=plain ../res))))
  20. ; https://stackoverflow.com/a/53325230/349514
  21. (executable
  22. (public_name seppo)
  23. (package seppo)
  24. (name seppo_bin)
  25. (libraries seppo_lib)
  26. ; https://discuss.ocaml.org/t/lwt-ppx-binary-footprint/11818/2
  27. (preprocess
  28. (pps lwt_ppx))
  29. ; https://discuss.ocaml.org/t/ld-error-missing-note-gnu-stack-section/12478/4
  30. (flags
  31. -safe-string (:include flags.sexp )))