Makefile 545 B

12345678910111213141516171819202122232425262728293031
  1. #
  2. # https://github.com/ocaml/dune/tree/master/example/sample-projects/hello_world
  3. # via https://stackoverflow.com/a/54712669
  4. #
  5. .PHONY: all build clean test install uninstall doc examples
  6. build:
  7. @echo "let git_sha = \""`git rev-parse --short HEAD`"\"" > lib/version.ml
  8. @echo "let date = \""`date +'%FT%T%z'`"\"" >> lib/version.ml
  9. dune build bin/meta.exe
  10. all: build
  11. test:
  12. dune runtest
  13. examples:
  14. dune build @examples
  15. install:
  16. dune install
  17. uninstall:
  18. dune uninstall
  19. doc:
  20. dune build @doc
  21. clean:
  22. rm -rf _build *.install