Skip to content

Commit

Permalink
switch from ocamlbuild to jbuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
trefis committed May 18, 2017
1 parent 625b10b commit 8047685
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 39 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ tmp
*.native
*.byte
*.install
.merlin
16 changes: 7 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
# This makefile is used for dev convenience. It is removed
# by the distribution process.

.PHONY: lib test doc clean
.PHONY: build doc clean

lib:
topkg build

test:
topkg build
topkg test
build:
jbuilder build -j16

doc:
topkg doc
@echo "waiting for jbuilder odoc support"
@#topkg doc

clean:
topkg clean
-rm -R _build
-rm octavius.install
5 changes: 0 additions & 5 deletions _tags

This file was deleted.

9 changes: 5 additions & 4 deletions opam → octavius.opam
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ tags: ["doc" "ocamldoc" "org:ocaml-doc"]
available: [ ocaml-version >= "4.03.0"]
depends: [
"ocamlfind" {build}
"ocamlbuild" {build}
"jbuilder" {build}
"topkg" {build & >= "0.7.5"} ]

build: [[
"ocaml" "pkg/pkg.ml" "build"
"--pinned" "%{pinned}%" ]]
build: [
["jbuilder" "subst"] {pinned}
["jbuilder" "build" "-p" name "-j" jobs]
]
7 changes: 0 additions & 7 deletions pkg/META

This file was deleted.

9 changes: 1 addition & 8 deletions pkg/pkg.ml
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
#!/usr/bin/env ocaml
#use "topfind"
#require "topkg"
open Topkg

let () =
Pkg.describe "octavius" @@ fun c ->
Ok [ Pkg.lib ~exts:(Exts.ext ".cmi") "src/octTypes";
Pkg.mllib "src/octavius.mllib";
Pkg.test ~run:false "test/main"]
#require "topkg-jbuilder.auto"
8 changes: 8 additions & 0 deletions src/jbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
(jbuild_version 1)

(ocamllex (octLexer))
(ocamlyacc (octParser))

(library
((name octavius)
(public_name octavius)))
File renamed without changes.
6 changes: 0 additions & 6 deletions src/octavius.mllib

This file was deleted.

6 changes: 6 additions & 0 deletions test/jbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
(jbuild_version 1)

(executable
((name main)
(public_name octavius)
(libraries (octavius))))

0 comments on commit 8047685

Please sign in to comment.