This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
|
|
@ -0,0 +1,5 @@
|
|||
(rule (with-stdout-to foo (run echo foo)))
|
||||
|
||||
(alias
|
||||
(name install)
|
||||
(deps foo))
|
||||
|
|
@ -0,0 +1 @@
|
|||
(lang dune 1.0)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
@all includes user defined install alias
|
||||
|
||||
$ dune build --display short @all
|
||||
echo foo
|
||||
|
|
@ -0,0 +1 @@
|
|||
(lang dune 1.0)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
@all builds custom install stanzas
|
||||
|
||||
$ dune build @subdir/all
|
||||
Error: No rule found for subdir/foobar
|
||||
-> required by alias subdir/all
|
||||
[1]
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(install
|
||||
(section share)
|
||||
(files foobar))
|
||||
|
|
@ -0,0 +1 @@
|
|||
(executable (name foo))
|
||||
|
|
@ -0,0 +1 @@
|
|||
(lang dune 1.0)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
@all builds private exe's
|
||||
|
||||
$ dune build @all --display short 2>&1 | grep -i exe
|
||||
ocamlopt foo.exe
|
||||
|
|
@ -0,0 +1 @@
|
|||
(library (name bar))
|
||||
|
|
@ -0,0 +1 @@
|
|||
(lang dune 1.0)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
@all builds private libs
|
||||
|
||||
$ dune build --display short @all 2>&1 | grep bar.cma
|
||||
ocamlc bar.cma
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
@all does not depend directly on file copies from the source tree
|
||||
|
||||
$ cat > dune-project <<EOF
|
||||
> (lang dune 3.0)
|
||||
> EOF
|
||||
|
||||
Add two files
|
||||
|
||||
$ touch a.ml b.ml
|
||||
|
||||
An empty project, should not copy any file.
|
||||
|
||||
$ dune build
|
||||
$ [ -d _build/default ] && find _build/default -name '*.ml'
|
||||
[1]
|
||||
|
||||
A project that only uses a.ml, should not copy b.ml
|
||||
|
||||
$ cat > dune <<EOF
|
||||
> (library (name a) (modules a))
|
||||
> EOF
|
||||
$ dune build
|
||||
$ find _build/default -name '*.ml'
|
||||
_build/default/a.ml
|
||||
|
||||
A project that uses both files, should copy both.
|
||||
|
||||
$ cat > dune <<EOF
|
||||
> (library (name a))
|
||||
> EOF
|
||||
$ dune build
|
||||
$ find _build/default -name '*.ml' | sort
|
||||
_build/default/a.ml
|
||||
_build/default/b.ml
|
||||
|
|
@ -0,0 +1 @@
|
|||
(rule (with-stdout-to foo (run echo foobar)))
|
||||
|
|
@ -0,0 +1 @@
|
|||
(lang dune 1.0)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
@all builds user defined rules
|
||||
|
||||
$ dune build --display short @all
|
||||
echo foo
|
||||
Loading…
Add table
Add a link
Reference in a new issue