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,12 @@
Generating .install files when opam files are in opam/ dir
$ cat >dune-project <<EOF
> (lang dune 3.8)
> (generate_opam_files true)
> (opam_file_location inside_opam_directory)
> (package
> (allow_empty)
> (name foobar))
> EOF
$ dune build foobar.install

View file

@ -0,0 +1,31 @@
Generate opam files in the opam/ sub directory
First the case when opam/ doesn't exist in the source
$ cat >dune-project <<EOF
> (lang dune 3.8)
> (generate_opam_files true)
> (opam_file_location inside_opam_directory)
> (package
> (name foobar))
> EOF
$ dune build @check
$ ls opam/foobar.opam
opam/foobar.opam
Now we test the case whenever opam is a source directory
$ rm opam/foobar.opam
$ dune build @check
$ ls opam/foobar.opam
opam/foobar.opam
We forbid .opam files in the root directory:
$ touch bar.opam
$ dune build @check
Error: When (opam_file_location inside_opam_directory) is set, all opam files
must live in the opam/ subdirecotry. The following opam files must be moved:
- bar.opam
[1]