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,41 @@
Allow binary name to vary using pforms
$ cat >dune-project <<EOF
> (lang dune 3.14)
> (package (name foo))
> EOF
$ cat >dune <<EOF
> (install
> (section bin)
> (files (script as %{read:foo})))
> EOF
$ cat >script <<EOF
> #!/bin/sh
> echo script
> EOF
$ chmod +x script
$ runtest() {
> printf $1 > foo
> dune build foo.install && cat _build/default/foo.install
> }
$ runtest x
lib: [
"_build/install/default/lib/foo/META"
"_build/install/default/lib/foo/dune-package"
]
bin: [
"_build/install/default/bin/x"
]
$ runtest y
lib: [
"_build/install/default/lib/foo/META"
"_build/install/default/lib/foo/dune-package"
]
bin: [
"_build/install/default/bin/y"
]