From f940ad446839483d0ec92a136899108f0dd6cf69 Mon Sep 17 00:00:00 2001 From: Maxime Levillain Date: Fri, 18 Oct 2024 10:24:14 +0200 Subject: [PATCH] better Makefile --- Makefile | 15 +++++++++++---- test/ppx/test_ppx_lib.ml | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index fa043df..ab70817 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,4 @@ +.PHONY: all build dev install clean doc deps opt-deps remove-opt-deps all: build @@ -17,7 +18,13 @@ doc: @dune build @doc @rsync -ru _build/default/_doc/_html/* docs/ -build-tests: - @opam install ocurl websocket-lwt-unix js_of_ocaml - @dune build test - \ No newline at end of file +deps: + @opam install --deps-only . + +opt-deps: deps + @opam pin -n add websocket-httpaf.~dev https://github.com/anmonteiro/websocket-httpaf.git + @opam pin -n add websocket-httpaf-lwt.~dev https://github.com/anmonteiro/websocket-httpaf.git + @opam install $(shell opam show -f depopts . | sed -e 's/{.*}//g' -e 's/"//g') + +remove-opt-deps: + @opam remove $(opam show -f depopts: . | sed -e 's/{.*}//g' -e 's/"//g') diff --git a/test/ppx/test_ppx_lib.ml b/test/ppx/test_ppx_lib.ml index 7291f6b..6bd7fb5 100644 --- a/test/ppx/test_ppx_lib.ml +++ b/test/ppx/test_ppx_lib.ml @@ -13,7 +13,7 @@ and base = "http://localhost:8080" type test_derive = { foo: string; bar: int; -} [@@get {path="/test/getter/{id: string}"; name="bla"; debug}] +} [@@get {path="/test/getter/{id: string}"; name="bla"}] let%post echo_input = { path="/echo_input"; raw_input=["text/plain"];