diff --git a/Makefile b/Makefile index e53da748296..3639f14addb 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,41 @@ -BINDIR?=/tmp/ +# OASIS_START +# DO NOT EDIT (digest: a3c674b4239234cbbe53afe090018954) -.PHONY: build install uninstall clean +SETUP = ocaml setup.ml -build: configure.done - obuild build +build: setup.data + $(SETUP) -build $(BUILDFLAGS) -configure.done: - obuild configure - touch configure.done +doc: setup.data build + $(SETUP) -doc $(DOCFLAGS) -install: - install -m 0755 dist/build/sm-cli/sm-cli ${BINDIR} +test: setup.data build + $(SETUP) -test $(TESTFLAGS) -uninstall: - rm -f ${BINDIR}/sm-cli +all: + $(SETUP) -all $(ALLFLAGS) + +install: setup.data + $(SETUP) -install $(INSTALLFLAGS) + +uninstall: setup.data + $(SETUP) -uninstall $(UNINSTALLFLAGS) + +reinstall: setup.data + $(SETUP) -reinstall $(REINSTALLFLAGS) clean: - obuild clean - rm -f configure.done + $(SETUP) -clean $(CLEANFLAGS) + +distclean: + $(SETUP) -distclean $(DISTCLEANFLAGS) + +setup.data: + $(SETUP) -configure $(CONFIGUREFLAGS) + +configure: + $(SETUP) -configure $(CONFIGUREFLAGS) + +.PHONY: build doc test all install uninstall reinstall clean distclean configure + +# OASIS_STOP diff --git a/_oasis b/_oasis new file mode 100644 index 00000000000..24c436277e7 --- /dev/null +++ b/_oasis @@ -0,0 +1,14 @@ +OASISFormat: 0.4 +BuildTools: ocamlbuild +Name: sm-cli +Version: 0.0.1 +Synopsis: CLI for interacting with SMAPI implementations +Authors: Me +License: LGPL with OCaml linking exception +Plugins: META (0.4), DevFiles (0.4) + +Executable sm-cli + MainIs: main.ml + Path: . + BuildDepends: xcp, xcp.storage, re, re.str, rpclib, rpclib.json, cmdliner, threads + CompiledObject: best diff --git a/main.ml b/main.ml index 2ae04a3a46e..5fb19e6aac6 100644 --- a/main.ml +++ b/main.ml @@ -207,7 +207,7 @@ module Common = struct verbose: bool; debug: bool; socket: string; - } with rpc + } [@@deriving rpc] let make verbose debug socket queue = begin match queue with diff --git a/sm-cli.obuild b/sm-cli.obuild deleted file mode 100644 index 8459ef8c06b..00000000000 --- a/sm-cli.obuild +++ /dev/null @@ -1,10 +0,0 @@ -name: sm-cli -version: 0.0.0 -synopsis: CLI for interacting with SMAPI implementations -obuild-ver: 1 - -executable sm-cli - main: main.ml - src-dir: . - build-deps: xcp, xcp.storage, re, re.str, rpclib, rpclib.json, cmdliner - pp: camlp4o