123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- cpu := $(shell uname -m)
- os := $(shell uname -s)
- ver := 0.1
- dst := _build/html2broadcast-br-v${ver}-$(os)-$(cpu)
- final: build $(dst)
- $(dst): _build/default/bin/html2broadcast.exe
- cp $^ $@
- chmod u+w $@
- strip $@
- file $@
- ls -Al $@
- test/assert.ml:
- curl --location --output $@ https://raw.githubusercontent.com/benjenkinsv95/ocaml-unit-testing-helpers/master/assert.ml
- #
- # https://github.com/ocaml/dune/tree/master/example/sample-projects/hello_world
- # via https://stackoverflow.com/a/54712669
- #
- .PHONY: all build clean test install uninstall doc examples
- bin/version.ml:
- @echo "let git_sha = \""`git rev-parse --short HEAD`"\"" > $@
- @echo "let date = \""`date +'%FT%T%z'`"\"" >> $@
- build: bin/version.ml
- dune build bin/html2broadcast.exe
- all: build
- test: test/assert.ml
- dune runtest
- examples:
- dune build @examples
- install:
- dune install
- uninstall:
- dune uninstall
- doc:
- dune build @doc
- clean:
- rm -rf _build bin/version.ml
|