Skip to content

Commit

Permalink
test(pkg): show precedence of make and gmake (#8750)
Browse files Browse the repository at this point in the history
Signed-off-by: Ali Caglayan <[email protected]>
  • Loading branch information
Alizter authored Oct 18, 2023
1 parent 08114a5 commit 70dabef
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions test/blackbox-tests/test-cases/pkg/opam-var/make-over-gmake.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
$ . ./opam-var-helpers.sh

If both make and gmake are available, we should prefer make.

opam doesn't resolve make but rather runs make literally so it is up to whatever is in
PATH to resolve it. This does mean that make is preferred over gmake so we should
replicate that behaviour.

We create a dummy package that will output the value of the opam make variable:
$ mkrepo
> mkpkg testpkg << EOF
> opam-version: "2.0"
> build: [ "echo" make ]
> EOF
> solve testpkg 2> /dev/null

We now create dummy versions of make and gmake.
$ cat > make; cat > gmake
We add the current directory to PATH. Dune will expand %{make} and should prefer make over
gmake.
$ PATH=.:$PATH
> build_pkg testpkg
$TESTCASE_ROOT/gmake

0 comments on commit 70dabef

Please sign in to comment.