[PATCH cygport] Allow customized arguments to dune install

William Hu via Cygwin-apps <[email protected]>
Newsgroups gmane.os.cygwin.applications
Message-ID <mbaw-UvZ-0RFf9KKRh0pJDPTMEJzsnXqsCy89ujUczSsABjvEPHXEECT6b48BvbEmTFqyTOMbvUUmIkT5IfO3cAgZTa0puluen0wO-nCIBM=@proton.me>
ocaml-dune.cygclass defines variables to customize the behavior of src_compile and src_test, but not src_install. Patch attached.
0001-Allow-customized-arguments-to-dune-install.patch (application/octet-stream, 1.5 KB)
From 18e87ac3573c9d80c279a59aa201f78124059d69 Mon Sep 17 00:00:00 2001
From: William Hu <[email protected]>
Date: Sun, 15 Jun 2025 19:27:32 -0400
Subject: [PATCH] Allow customized arguments to dune install

Also document OCAML_DUNE_TEST_TARGETS
---
 cygclass/ocaml-dune.cygclass | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/cygclass/ocaml-dune.cygclass b/cygclass/ocaml-dune.cygclass
index 3ea2a373..d2941382 100644
--- a/cygclass/ocaml-dune.cygclass
+++ b/cygclass/ocaml-dune.cygclass
@@ -54,15 +54,27 @@ ocaml_dune_compile() {
 	dune build --display=verbose --profile=release ${OCAML_DUNE_BUILD_ARGS} ${@} || error "dune build failed"
 }
 
+#****v* ocaml-dune.cygclass/OCAML_DUNE_INSTALL_ARGS
+#  DESCRIPTION
+#  Arguments, usually install targets, to be passed to "dune install"
+#  by ocaml_dune_install.
+#****
+
 #****I* ocaml-dune.cygclass/ocaml_dune_install
 #  DESCRIPTION
 #  Runs "dune install" with a destdir of $D.
 #****
 ocaml_dune_install() {
 	DUNE_BUILD_DIR=${B} \
-	dune install --display=verbose --destdir ${D} || error "dune install failed"
+	dune install --display=verbose --destdir ${D} ${OCAML_DUNE_INSTALL_ARGS} ${@} || error "dune install failed"
 }
 
+#****v* ocaml-dune.cygclass/OCAML_DUNE_TEST_TARGETS
+#  DESCRIPTION
+#  Arguments, usually test targets, to be passed to "dune runtest"
+#  by ocaml_dune_test.
+#****
+
 #****T* ocaml-dune.cygclass/ocaml_dune_test
 #  DESCRIPTION
 #  Runs "dune runtest" with any given test directories.
-- 
2.45.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.