diff --git a/Makefile b/Makefile index 58eaaa5..bb0eb6d 100644 --- a/Makefile +++ b/Makefile @@ -3,18 +3,18 @@ VERSION := 0.6.2 .PHONY : build build : - jbuilder build --dev + dune build .PHONY : test test : - jbuilder runtest --dev --no-buffer -j 1 + dune runtest --no-buffer -j 1 BISECT_FILES_PATTERN := _build/default/test/bisect*.out COVERAGE_DIR := _coverage .PHONY : coverage coverage : - BISECT_ENABLE=yes jbuilder build --dev @build-test + BISECT_ENABLE=yes dune build @build-test rm -rf $(BISECT_FILES_PATTERN) (cd _build/default/test && ./test.exe) bisect-ppx-report \ @@ -27,7 +27,7 @@ BS4_MISSING := Beautiful Soup not installed. Skipping Python performance test. .PHONY : performance-test performance-test : - jbuilder build --dev @build-performance-test + dune build @build-performance-test (cd _build/default/test/performance && ./performance.exe) @((python -c "import bs4" 2> /dev/null \ || (echo $(BS4_MISSING); exit 1)) \ @@ -76,6 +76,6 @@ package-docs : docs .PHONY : clean clean : - jbuilder clean + dune clean rm -rf $(COVERAGE_DIR) # rm -rf docs/html diff --git a/dune-project b/dune-project new file mode 100644 index 0000000..de4fc20 --- /dev/null +++ b/dune-project @@ -0,0 +1 @@ +(lang dune 1.0) diff --git a/lambdasoup.opam b/lambdasoup.opam index 95ce601..53e3d4d 100644 --- a/lambdasoup.opam +++ b/lambdasoup.opam @@ -13,13 +13,11 @@ dev-repo: "https://github.com/aantron/lambda-soup.git" depends: [ # This should be removed for release. "bisect_ppx" {>= "1.3.0"} - # As a consequence of depending on Jbuilder, Lambda Soup requires OCaml - # 4.02.3. - "jbuilder" {build & >= "1.0+beta10"} + # As a consequence of depending on Dune, Lambda Soup requires OCaml 4.02.3. + "dune" {build} "markup" {>= "0.7.1"} - "ounit" {test} ] build: [ - ["jbuilder" "build" "-p" name "-j" jobs] + ["dune" "build" "-p" name "-j" jobs] ] diff --git a/src/dune b/src/dune new file mode 100644 index 0000000..355f4bb --- /dev/null +++ b/src/dune @@ -0,0 +1,7 @@ +(library + (name soup) + (public_name lambdasoup) + (synopsis "Easy functional HTML scraping and manipulation") + (flags (:standard -w +A -warn-error -3)) + (preprocess (pps bisect_ppx -conditional)) + (libraries markup)) diff --git a/src/jbuild b/src/jbuild deleted file mode 100644 index a461ce3..0000000 --- a/src/jbuild +++ /dev/null @@ -1,9 +0,0 @@ -(jbuild_version 1) - -(library - ((name soup) - (public_name lambdasoup) - (synopsis "Easy functional HTML scraping and manipulation") - (flags (:standard -w +A -warn-error -3)) - (preprocess (pps (bisect_ppx -conditional))) - (libraries (markup)))) diff --git a/test/dune b/test/dune new file mode 100644 index 0000000..61e0117 --- /dev/null +++ b/test/dune @@ -0,0 +1,13 @@ +(executable + (name test) + (flags (:standard -w +A)) + (libraries lambdasoup oUnit)) + +(alias + (name build-test) + (deps test.exe (source_tree pages))) + +(alias + (name runtest) + (deps test.exe (source_tree pages)) + (action (run %{exe:test.exe}))) diff --git a/test/jbuild b/test/jbuild deleted file mode 100644 index 78701b5..0000000 --- a/test/jbuild +++ /dev/null @@ -1,15 +0,0 @@ -(jbuild_version 1) - -(executable - ((name test) - (flags (:standard -w +A)) - (libraries (lambdasoup oUnit)))) - -(alias - ((name build-test) - (deps (test.exe (files_recursively_in pages))))) - -(alias - ((name runtest) - (deps (test.exe (files_recursively_in pages))) - (action (run ${<})))) diff --git a/test/performance/dune b/test/performance/dune new file mode 100644 index 0000000..5f81135 --- /dev/null +++ b/test/performance/dune @@ -0,0 +1,8 @@ +(executable + (name performance) + (flags (:standard -w +A)) + (libraries lambdasoup unix)) + +(alias + (name build-performance-test) + (deps performance.exe (source_tree ../pages))) diff --git a/test/performance/jbuild b/test/performance/jbuild deleted file mode 100644 index 4b675ed..0000000 --- a/test/performance/jbuild +++ /dev/null @@ -1,10 +0,0 @@ -(jbuild_version 1) - -(executable - ((name performance) - (flags (:standard -w +A)) - (libraries (lambdasoup unix)))) - -(alias - ((name build-performance-test) - (deps (performance.exe (files_recursively_in ../pages)))))