From 6bda17fb1199ec604c07eeafe9a1178c835f8729 Mon Sep 17 00:00:00 2001 From: wiz Date: Mon, 14 Feb 2022 11:37:48 +0000 Subject: [PATCH] mk/ocaml.mk: add some automation for prefixing ${PLIST.ocaml-opt} --- mk/ocaml.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mk/ocaml.mk b/mk/ocaml.mk index 0235e7dd911b..ed6c76958c58 100644 --- a/mk/ocaml.mk +++ b/mk/ocaml.mk @@ -1,4 +1,4 @@ -# $NetBSD: ocaml.mk,v 1.30 2022/02/14 11:24:57 wiz Exp $ +# $NetBSD: ocaml.mk,v 1.31 2022/02/14 11:37:48 wiz Exp $ # # This Makefile fragment handles the common variables used by OCaml packages. # @@ -172,6 +172,8 @@ OCAML_SITELIBDIR= lib/ocaml/site-lib MAKE_ENV+= OCAML_SITELIBDIR="${OCAML_SITELIBDIR}" PLIST_SUBST+= OCAML_SITELIB="${OCAML_SITELIBDIR}" +PRINT_PLIST_AWK+= { gsub(/^.+\.cmx/, "$${PLIST.ocaml-opt}&") } +PRINT_PLIST_AWK+= { gsub(/^.+\.a$$/, "$${PLIST.ocaml-opt}&") } PRINT_PLIST_AWK+= { gsub(/${OCAML_SITELIBDIR:S|/|\\/|g}/, \ "$${OCAML_SITELIB}"); \ print; next; }