Skip to content

Commit

Permalink
Merge branch 'master' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Jan 15, 2018
2 parents 7d93f1f + 943cff0 commit 2351b18
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 13 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build:
jbuilder build @install

test:
jbuilder runtest
jbuilder runtest --no-buffer

clean:
jbuilder clean
Expand Down
2 changes: 1 addition & 1 deletion qtest/Makefile
Original file line number Diff line number Diff line change
@@ -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) \
Expand Down
2 changes: 1 addition & 1 deletion qtest/jbuild
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion sequence.opam
Original file line number Diff line number Diff line change
Expand Up @@ -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"
5 changes: 2 additions & 3 deletions src/bigarray/jbuild
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
))
13 changes: 10 additions & 3 deletions src/jbuild
Original file line number Diff line number Diff line change
@@ -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))
))

14 changes: 14 additions & 0 deletions src/mkflags.ml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 2351b18

Please sign in to comment.