Skip to content

Commit

Permalink
Upgrade from Jbuilder to Dune
Browse files Browse the repository at this point in the history
  • Loading branch information
aantron committed Jul 30, 2019
1 parent 6ff9c3f commit f8269a1
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 35 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY : build
build :
jbuilder build --dev
dune build

.PHONY : clean
clean :
jbuilder clean
dune clean
2 changes: 2 additions & 0 deletions dune-project
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
(lang dune 1.0)
(name lwt_glib)
4 changes: 2 additions & 2 deletions lwt_glib.opam
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ depends: [
"base-unix"
"conf-glib-2" {build}
"conf-pkg-config" {build}
"jbuilder" {build & >= "1.0+beta10"}
"dune" {build & >= "1.0"}
"lwt" {>= "3.0.0"}
]

build: [
["jbuilder" "build" "-p" name "-j" jobs]
["dune" "build" "-p" name "-j" jobs]
]
3 changes: 3 additions & 0 deletions src/config/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(executables
(names discover)
(libraries unix str))
5 changes: 0 additions & 5 deletions src/config/jbuild

This file was deleted.

23 changes: 23 additions & 0 deletions src/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
(library
(name lwt_glib)
(public_name lwt_glib)
(synopsis "GLib integration for Lwt")
(wrapped false)
(libraries lwt lwt.unix)
(flags :standard -w +A)
(c_names lwt_glib_stubs)
(c_flags (:include glib_c_flags.sexp))
(c_library_flags (:include glib_c_library_flags.sexp)))

;; implements pkg-config logic from glib/myocamlbuild

(rule
(targets glib_c_flags.sexp glib_c_library_flags.sexp)
(deps (:< config/discover.exe) ocamlc_config)
(action (run %{<} ocamlc_config)))

;; create ocamlc -config file

(rule
(targets ocamlc_config)
(action (with-stdout-to %{targets} (run %{ocamlc} -config))))
26 changes: 0 additions & 26 deletions src/jbuild

This file was deleted.

0 comments on commit f8269a1

Please sign in to comment.