Passage à jbuilder + opam
This commit is contained in:
parent
a4dc480bf2
commit
bb1e08cf62
6
.merlin
6
.merlin
@ -1,3 +1,3 @@
|
||||
S .
|
||||
B _build
|
||||
PKG js_of_ocaml gen_js_api
|
||||
B _build/default
|
||||
FLG -w -40
|
||||
PKG gen_js_api
|
||||
|
3
META
3
META
@ -1,3 +0,0 @@
|
||||
description="OCaml binding to Google Apps"
|
||||
archive(byte)="googleApps.cma"
|
||||
|
19
Makefile
19
Makefile
@ -1,19 +0,0 @@
|
||||
.PHONY: install uninstall
|
||||
|
||||
install: META googleApps.mli _build/googleApps.cmo _build/googleApps.cmi _build/googleApps.cma
|
||||
ocamlfind install ocaml-google-apps $^
|
||||
|
||||
uninstall:
|
||||
ocamlfind remove ocaml-google-apps
|
||||
|
||||
googleApps.ml: googleApps.mli
|
||||
ocamlbuild googleApps.ml
|
||||
|
||||
_build/googleApps.cmi: googleApps.mli
|
||||
ocamlbuild googleApps.cmi
|
||||
|
||||
_build/googleApps.cmo: googleApps.mli googleApps.ml
|
||||
ocamlbuild googleApps.cmo
|
||||
|
||||
_build/googleApps.cma: googleApps.mli googleApps.ml
|
||||
ocamlbuild googleApps.cma
|
5
README.org
Normal file
5
README.org
Normal file
@ -0,0 +1,5 @@
|
||||
#+TITLE: Utilisation avec opam
|
||||
|
||||
#+BEGIN_SRC
|
||||
opam install . -y
|
||||
#+END_SRC
|
4
_tags
4
_tags
@ -1,4 +0,0 @@
|
||||
<googleApps.*>: package(gen_js_api.ppx)
|
||||
<test.cmo>: package(js_of_ocaml)
|
||||
<test.byte>: package(gen_js_api), package(js_of_ocaml), linkpkg, no_check_prims,prettyjs
|
||||
|
13
jbuild
Normal file
13
jbuild
Normal file
@ -0,0 +1,13 @@
|
||||
(jbuild_version 1)
|
||||
|
||||
(library(
|
||||
(name googleApps)
|
||||
(public_name ocaml-google-apps)
|
||||
(libraries (gen_js_api))
|
||||
))
|
||||
|
||||
(rule(
|
||||
(targets (googleApps.ml))
|
||||
(deps (googleApps.mli))
|
||||
(action (run ${bin:ocamlfind} gen_js_api/gen_js_api ${<}))
|
||||
))
|
0
jbuild-workspace.here
Normal file
0
jbuild-workspace.here
Normal file
@ -1,32 +0,0 @@
|
||||
open Ocamlbuild_plugin
|
||||
|
||||
module MyProject = struct
|
||||
flag ["js_of_ocaml";"prettyjs"](A"--pretty");
|
||||
flag ["link";"byte";"ocaml";"program";"no_check_prims"](A"-no-check-prims");
|
||||
rule "%.byte -> %js"
|
||||
~dep:"%.byte"
|
||||
~prod:"%.js"
|
||||
(
|
||||
fun env _ ->
|
||||
let input = env "%.byte" in
|
||||
let tags = tags_of_pathname input ++ "js_of_ocaml" in
|
||||
Cmd(S[A"js_of_ocaml"; T tags; A"+gen_js_api/ojs_runtime.js"; A input])
|
||||
);
|
||||
rule "%.mli -> %.ml"
|
||||
~dep:"%.mli"
|
||||
~prod:"%.ml"
|
||||
(
|
||||
fun env _ ->
|
||||
let input = env "%.mli" in
|
||||
Cmd(S[A"ocamlfind"; A"gen_js_api/gen_js_api"; A input])
|
||||
)
|
||||
end
|
||||
|
||||
let () = dispatch (
|
||||
function
|
||||
| Before_options ->
|
||||
Options.use_ocamlfind := true;
|
||||
| After_rules ->
|
||||
()
|
||||
| _ -> ()
|
||||
)
|
14
ocaml-google-apps.opam
Normal file
14
ocaml-google-apps.opam
Normal file
@ -0,0 +1,14 @@
|
||||
opam-version: "2.0"
|
||||
name: "ocaml-google-apps"
|
||||
version: "0.1"
|
||||
synopsis: "OCaml binding to Google Apps"
|
||||
description: """
|
||||
Binding to Google Apps using gen_js_api (https://github.com/LexiFi/gen_js_api):
|
||||
to be used with js_of_ocaml.
|
||||
|
||||
Functions are added/adapted when I need it.
|
||||
"""
|
||||
maintainer: "Matthieu Dubuget <matthieu.dubuget@gmail.com>"
|
||||
authors: ["Matthieu Dubuget <matthieu.dubuget@gmail.com>"]
|
||||
build: [["jbuilder" "build" "-p" name "-j" jobs]]
|
||||
depends: ["jbuilder" "gen_js_api"]
|
Loading…
Reference in New Issue
Block a user