Skip to content

Commit

Permalink
Switched to dune, dune-release, and OPAM 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mmottl committed Oct 25, 2018
1 parent 9305e57 commit 8c5373a
Show file tree
Hide file tree
Showing 61 changed files with 117 additions and 302 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### 11.0.2 (2018-10-24)

* Switched to dune, dune-release, and OPAM 2.0


### 11.0.1 (2018-05-23)

* Fixed warnings and errors in configuration code due to upstream changes.
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.PHONY: all clean doc

all:
jbuilder build @install --dev
dune build @install

clean:
jbuilder clean
dune clean

doc:
jbuilder build --dev @doc
dune build @doc
4 changes: 4 additions & 0 deletions dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(env
(dev (flags (:standard -w -9 -principal)))
(release (ocamlopt_flags (:standard -O3)))
)
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.1)
(name lacaml)
10 changes: 10 additions & 0 deletions examples/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
EXAMPLES = $(wildcard *.ml)
TARGETS = $(patsubst %.ml, %.bc, $(EXAMPLES))

.PHONY: all clean

all:
@dune build $(TARGETS)

clean:
@dune clean
File renamed without changes.
9 changes: 0 additions & 9 deletions examples/blas/Makefile

This file was deleted.

10 changes: 0 additions & 10 deletions examples/blas/jbuild

This file was deleted.

27 changes: 27 additions & 0 deletions examples/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
(executables
(names
blas
eig
gbsv
lin_eq
lin_eq_comp
lin_reg
nag_gbsv
nag_gesv
nag_gtsv
nag_pbsv
nag_posv
nag_ppsv
nag_ptsv
nag_spsv
nag_sysv
qr
sbev
sbgv
schur_complex
schur_real
shuffle
svd
)
(libraries lacaml)
)
File renamed without changes.
9 changes: 0 additions & 9 deletions examples/eig/Makefile

This file was deleted.

10 changes: 0 additions & 10 deletions examples/eig/jbuild

This file was deleted.

3 changes: 1 addition & 2 deletions examples/lin_eq/gbsv.ml → examples/gbsv.ml
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,4 @@ let () =
let res = Vec.sub (gbmv ab kl ku ~ar:(kl + row) sol) b in
printf "@[<2>Solving general band matrix:@\n@\n";
printf "Sol: X = @[%a@]@\n" pp_rfvec sol;
printf "A X - b = %a@]@\n@\n" pp_rfvec res;

printf "A X - b = %a@]@\n@\n" pp_rfvec res
File renamed without changes.
9 changes: 0 additions & 9 deletions examples/lin_eq/Makefile

This file was deleted.

10 changes: 0 additions & 10 deletions examples/lin_eq/jbuild

This file was deleted.

File renamed without changes.
9 changes: 0 additions & 9 deletions examples/lin_eq_comp/Makefile

This file was deleted.

10 changes: 0 additions & 10 deletions examples/lin_eq_comp/jbuild

This file was deleted.

File renamed without changes.
9 changes: 0 additions & 9 deletions examples/lin_reg/Makefile

This file was deleted.

10 changes: 0 additions & 10 deletions examples/lin_reg/jbuild

This file was deleted.

11 changes: 0 additions & 11 deletions examples/nag/Makefile

This file was deleted.

13 changes: 0 additions & 13 deletions examples/nag/jbuild

This file was deleted.

File renamed without changes.
File renamed without changes.
3 changes: 1 addition & 2 deletions examples/nag/nag_gtsv.ml → examples/nag_gtsv.ml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,4 @@ let b= Vec.of_array [| 2.7; -0.5; 2.6; 0.6; 2.7 |]
let () =
let x = copy b in
gtsv dl d du (Mat.from_col_vec x);
printf "Solution: X = @[%a@]@\n" pp_rfvec x;

printf "Solution: X = @[%a@]@\n" pp_rfvec x
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion examples/nag/nag_ptsv.ml → examples/nag_ptsv.ml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@ let () =
printf "Solution: X = @[%a@]@\n" pp_rfvec x;
printf "Diagonal elements of the diagonal matrix D: @[%a@]@\n" pp_rfvec d;
printf "Sub-diagonal elements of the Cholesky factor L: @[%a@]@\n" pp_rfvec e

1 change: 0 additions & 1 deletion examples/nag/nag_spsv.ml → examples/nag_spsv.ml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,3 @@ let () =
pp_float_el_default := (fun fm x -> if (x: float) = x then fprintf fm "%G" x);
printf "Details of the factorization: @[%a@]@\n" pp_fmat a;
printf "Pivot indices: @[%a@]@\n" pp_rivec ipiv

File renamed without changes.
File renamed without changes.
9 changes: 0 additions & 9 deletions examples/qr/Makefile

This file was deleted.

10 changes: 0 additions & 10 deletions examples/qr/jbuild

This file was deleted.

17 changes: 7 additions & 10 deletions examples/run_examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@

set -e

for dir in `find . -mindepth 1 -maxdepth 1 -type d`; do
cd $dir
for file in *.ml; do
ex=`basename $file .ml`
exexec=$ex.exe
echo TESTING $dir/$ex ==================================================
jbuilder build $exexec
../../_build/default/examples/$dir/$exexec
done
cd ..
dune build `echo *.ml | sed -e 's/.ml/.exe/g'`

for file in *.ml; do
ex=`basename $file .ml`
exexec=$ex.exe
echo TESTING $dir/$ex ==================================================
../_build/default/examples/$dir/$exexec
done
File renamed without changes.
File renamed without changes.
9 changes: 0 additions & 9 deletions examples/schur/Makefile

This file was deleted.

10 changes: 0 additions & 10 deletions examples/schur/jbuild

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 0 additions & 9 deletions examples/shuffle/Makefile

This file was deleted.

10 changes: 0 additions & 10 deletions examples/shuffle/jbuild

This file was deleted.

File renamed without changes.
9 changes: 0 additions & 9 deletions examples/svd/Makefile

This file was deleted.

10 changes: 0 additions & 10 deletions examples/svd/jbuild

This file was deleted.

1 change: 0 additions & 1 deletion jbuild-workspace

This file was deleted.

5 changes: 0 additions & 5 deletions lacaml.descr

This file was deleted.

14 changes: 10 additions & 4 deletions lacaml.opam
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,24 @@ bug-reports: "https://github.com/mmottl/lacaml/issues"
tags: [ "clib:lapack" "clib:blas" ]

build: [
["jbuilder" "subst" "-p" name] {pinned}
["jbuilder" "build" "-p" name "-j" jobs]
["dune" "subst"] {pinned}
["dune" "build" "-p" name "-j" jobs]
]

depends: [
"ocaml" {>= "4.05"}
"dune" {build & >= "1.4.0"}
"conf-blas" {build}
"conf-lapack" {build}
"base" {build}
"stdio" {build}
"configurator" {build}
"jbuilder" {build & >= "1.0+beta13"}
"base-bytes"
"base-bigarray"
]

synopsis: "Lacaml - OCaml-bindings to BLAS and LAPACK"

description: """
Lacaml interfaces the BLAS-library (Basic Linear Algebra Subroutines) and
LAPACK-library (Linear Algebra routines). It also contains many additional
convenience functions for vectors and matrices."""
4 changes: 2 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TARGETS = lacaml.cma liblacaml_stubs.a
.PHONY: all clean

all:
@jbuilder build --dev $(TARGETS)
@dune build $(TARGETS)

clean:
@jbuilder clean
@dune clean
5 changes: 2 additions & 3 deletions src/config/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
TARGETS = discover.bc make_prec_dep.bc
JBUILDER_ROOT = ../..

.PHONY: all clean

all:
@jbuilder build --dev $(TARGETS)
@dune build $(TARGETS)

clean:
@jbuilder clean
@dune clean
Loading

0 comments on commit 8c5373a

Please sign in to comment.