diff --git a/.travis.yml b/.travis.yml index c73cd77..4edcd67 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,10 +26,8 @@ before_install: install: # Install dependencies - opam pin add --no-action sequence . - - opam install oasis - - opam install --deps-only sequence + - opam install jbuilder base-bytes result script: - make build - opam install qcheck qtest - - ./configure --enable-tests - make test diff --git a/Makefile b/Makefile index 93b91f9..0d26fde 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ build: jbuilder build @install test: - jbuilder runtest + jbuilder runtest --no-buffer clean: jbuilder clean diff --git a/qtest/Makefile b/qtest/Makefile index 09e30e4..c8a9751 100644 --- a/qtest/Makefile +++ b/qtest/Makefile @@ -1,6 +1,6 @@ QTEST_PREAMBLE='' -DONTTEST=../src/sequenceLabels.ml +DONTTEST=../src/sequenceLabels.ml ../src/mkflags.ml QTESTABLE=$(filter-out $(DONTTEST), \ $(wildcard ../src/*.ml) \ $(wildcard ../src/*.mli) \ diff --git a/qtest/jbuild b/qtest/jbuild index 3b74acb..0843466 100644 --- a/qtest/jbuild +++ b/qtest/jbuild @@ -1,7 +1,7 @@ (rule ((targets (run_qtest.ml)) - (deps ((file Makefile))) + (deps ((file Makefile) )) ; (glob_files ../src/**/*.ml{,i}))) (fallback) ;(libraries (qtest qcheck)) (action diff --git a/sequence.opam b/sequence.opam index 45b873e..cb04bad 100644 --- a/sequence.opam +++ b/sequence.opam @@ -31,6 +31,6 @@ homepage: "https://github.com/c-cube/sequence/" depopts: [ "base-bigarray" ] -doc: "http://cedeela.fr/~simon/software/sequence/Sequence.html" +doc: "https://c-cube.github.io/sequence/" bug-reports: "https://github.com/c-cube/sequence/issues" dev-repo: "https://github.com/c-cube/sequence.git" diff --git a/src/bigarray/jbuild b/src/bigarray/jbuild index e59b07f..f44100a 100644 --- a/src/bigarray/jbuild +++ b/src/bigarray/jbuild @@ -5,7 +5,6 @@ (libraries (sequence bigarray)) (wrapped false) (optional) - (flags (:standard -w +a-4-42-44-48-50-58-32-60@8 -w -33 -safe-string -color always)) - (ocamlopt_flags (:standard -O3 -color always - -unbox-closures -unbox-closures-factor 20)) + (flags (:standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string)) + (ocamlopt_flags (:standard (:include ../flambda.flags))) )) diff --git a/src/jbuild b/src/jbuild index 981b07e..c20d7d9 100644 --- a/src/jbuild +++ b/src/jbuild @@ -1,11 +1,18 @@ +(rule + ((targets (flambda.flags)) + (deps ((file mkflags.ml))) + (fallback) + (action + (run ocaml ./mkflags.ml)) + )) (library ((name sequence) (public_name sequence) (wrapped false) - (flags (:standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string -color always -nolabels)) - (ocamlopt_flags (:standard -O3 -color always - -unbox-closures -unbox-closures-factor 20)) + (modules (Sequence SequenceLabels)) + (flags (:standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string -nolabels)) + (ocamlopt_flags (:standard (:include flambda.flags))) (libraries (bytes result)) )) diff --git a/src/mkflags.ml b/src/mkflags.ml new file mode 100644 index 0000000..e6edba0 --- /dev/null +++ b/src/mkflags.ml @@ -0,0 +1,14 @@ + + let () = + let major, minor = + Scanf.sscanf Sys.ocaml_version "%u.%u" + (fun major minor -> major, minor) + in + let after_4_3 = (major, minor) >= (4, 3) in + let flags_file = open_out "flambda.flags" in + if after_4_3 then ( + output_string flags_file "(-O3 -unbox-closures -unbox-closures-factor 20 -color always)\n"; + ) else ( + output_string flags_file "()\n"; + ); + close_out flags_file