Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dune & dune-release #67

Merged
merged 7 commits into from
Dec 17, 2018
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions Makefile
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,21 +1,30 @@
.PHONY: all
all:
@jbuilder build @install @DEFAULT
@dune build @install @examples

.PHONY: run-examples
run-examples:
dune exec examples/filtering.exe < examples/filtering.json

.PHONY: test
test:
@jbuilder runtest
@dune runtest --force
NathanReb marked this conversation as resolved.
Show resolved Hide resolved

.PHONY: check
NathanReb marked this conversation as resolved.
Show resolved Hide resolved
check: test

.PHONY: install
install:
@jbuilder install
@dune install

.PHONY: uninstall
uninstall:
@jbuilder uninstall
@dune uninstall

.PHONY: bench
bench:
@jbuilder build bench/bench.exe

.PHONY: clean all bench test check install uninstall
@dune build bench/bench.exe

.PHONY: clean
clean:
jbuilder clean
@dune clean
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ _This library is for manipulating the json AST directly. For mapping between OCa
Library documentation
---------------------

Currently at https://mjambon.github.io/mjambon2016/yojson-doc/Yojson.html

_The link above is for the ocamldoc-generated of some past version of yojson. Suggestions on how to keep this documentation updated automatically for each minor release are welcome._
Currently at https://ocaml-community.github.io/yojson/

Design goals
------------
Expand Down
5 changes: 5 additions & 0 deletions bench/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
;; doesn't actually build b/c json_io doesn't exist
(executable
(name bench)
(flags (-safe-string))
(libraries yojson))
7 changes: 0 additions & 7 deletions bench/jbuild

This file was deleted.

5 changes: 5 additions & 0 deletions bin/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(executable
(name ydump)
(public_name ydump)
(flags (-safe-string))
(libraries yojson))
7 changes: 0 additions & 7 deletions bin/jbuild

This file was deleted.

1 change: 1 addition & 0 deletions dune-project
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(lang dune 1.0)
6 changes: 0 additions & 6 deletions examples/Makefile

This file was deleted.

8 changes: 8 additions & 0 deletions examples/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
(executables
NathanReb marked this conversation as resolved.
Show resolved Hide resolved
(names filtering)
(flags (-safe-string))
(libraries yojson))

(alias
(name examples)
(deps filtering.exe))
3 changes: 1 addition & 2 deletions examples/filtering.ml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
(*
ocamlfind ocamlopt -o filtering filtering.ml -package yojson -linkpkg
./filtering <<EOF
dune exec examples/filtering.exe <<EOF
{
"id": "398eb027",
"name": "John Doe",
Expand Down
10 changes: 0 additions & 10 deletions examples/jbuild

This file was deleted.

5 changes: 0 additions & 5 deletions examples/run-examples.sh

This file was deleted.

38 changes: 38 additions & 0 deletions lib/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
(ocamllex read)

(rule
(targets yojson.ml)
(deps
(:out yojson.cppo.ml)
read.ml
write.ml
safe.ml
pretty.ml
write2.ml
common.ml
util.ml
type.ml)
(action (run cppo %{out} -o %{targets})))

(rule
(targets yojson.mli)
(deps
(:out yojson.cppo.mli)
write.mli
read.mli
safe.mli
pretty.mli
write2.mli
common.mli
util.mli
type.ml)
(action (run cppo %{out} -o %{targets})))

(library
(name yojson)
(public_name yojson)
(modules yojson yojson_biniou)
(wrapped false)
(synopsis "JSON parsing and printing (successor of json-wheel)")
(flags (-safe-string))
(libraries easy-format biniou))
40 changes: 0 additions & 40 deletions lib/jbuild

This file was deleted.

2 changes: 0 additions & 2 deletions pkg/pkg.ml

This file was deleted.

8 changes: 4 additions & 4 deletions yojson.opam
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ bug-reports: "https://github.com/ocaml-community/yojson/issues"
dev-repo: "git+https://github.com/ocaml-community/yojson.git"
doc: "https://ocaml-community.github.io/yojson/"
build: [
["jbuilder" "subst" "-n" name] {pinned}
["jbuilder" "build" "-p" name "-j" jobs]
["dune" "subst"] {pinned}
["dune" "build" "-p" name "-j" jobs]
]
run-test: ["jbuilder" "runtest" "-p" name]
run-test: ["dune" "runtest" "-p" name]
NathanReb marked this conversation as resolved.
Show resolved Hide resolved
depends: [
"ocaml" {>= "4.02.3"}
"jbuilder" {build}
"dune" {build}
"cppo" {build}
"easy-format"
"biniou" {>= "1.2.0"}
Expand Down