This commit is contained in:
swrup 2025-11-11 02:07:51 +01:00
parent aa2ff7b2f0
commit 2f3113f55d
11742 changed files with 1223940 additions and 0 deletions

View file

@ -0,0 +1,13 @@
$ cat >dune-project <<EOF
> (lang dune 2.7)
> EOF
$ cat >dune.inc <<EOF
> (dirs foo)
> (rule (with-stdout-to foo (echo bar)))
> EOF
$ cat >dune <<EOF
> (include dune.inc)
> EOF
$ dune build ./foo
$ cat _build/default/foo
bar

View file

@ -0,0 +1,14 @@
Test the include stanza inside a subdirectory
$ cat >dune-project <<EOF
> (lang dune 3.13)
> EOF
$ mkdir a
$ cat >a/dune <<EOF
> (include dune.inc)
> EOF
$ cat >a/dune.inc <<EOF
> (rule (with-stdout-to foo (echo "")))
> EOF
$ dune build a/foo

View file

@ -0,0 +1,10 @@
$ dune build
File "dune", line 1, characters 0-15:
1 | (include a.inc)
^^^^^^^^^^^^^^^
Error: Recursive inclusion of dune files detected:
File a.inc is included from c.inc:1
included from b.inc:1
-> included from a.inc:1
-> included from dune:1
[1]

View file

@ -0,0 +1,14 @@
Test the include stanza pulling from a parent dir
$ cat >dune-project <<EOF
> (lang dune 3.13)
> EOF
$ mkdir a
$ cat >a/dune <<EOF
> (include ../dune.inc)
> EOF
$ cat >dune.inc <<EOF
> (rule (with-stdout-to foo (echo "")))
> EOF
$ dune build a/foo