1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
PKGVERSION = $(shell git describe --always --dirty)
WEB = san@math.umons.ac.be:~/public_html/software/
build:
dune build @install examples/example.exe -j 4
tests: build
dune runtest --force
install uninstall clean:
dune $@
doc: build
dune build @doc
sed -e 's/%%VERSION%%/$(PKGVERSION)/' --in-place \
_build/default/_doc/_html/csv/Csv/index.html \
_build/default/_doc/_html/csv-lwt/Csv_lwt/index.html
upload-doc: doc
scp -C -p -r _build/default/_doc/csv/ $(WEB)
scp -C -p -r _build/default/_doc/csv-lwt/ $(WEB)
scp -C -p _build/default/_doc/odoc.css $(WEB)
csvtool: build
dune exec csvtool pastecol 1-3 2,1,2 \
tests/testcsv9.csv tests/testcsv9.csv
example:
dune exec examples/example.exe
submit:
dune-release distrib
dune-release publish distrib
dune-release opam pkg -p csv
dune-release opam pkg -p csv-lwt
# Perform the subtitution that dune-release does not
# (until opam2, https://discuss.ocaml.org/t/sync-versions-of-several-packages-coming-from-a-single-repo/808/5)
sed -e 's/\(^ *"csv"\) */\1 {= "$(PKGVERSION)"}/' --in-place \
_build/csv-lwt.$(PKGVERSION)/opam
# until we have https://github.com/ocaml/opam-publish/issues/38
[ -d packages ] ||(echo "ERROR: Make a symbolic link packages → \
opam-repo/packages"; exit 1)
cp -r _build/csv.* packages/csv/
cp -r _build/csv-lwt.* packages/csv-lwt/
cd packages && git add csv csv-lwt
# CONDUIT_TLS=native dune-release opam submit -n csv -n csv-lwt
.PHONY: build tests install uninstall doc upload-doc clean csvtool example submit
|