pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/mk



Module Name:    pkgsrc
Committed By:   jaapb
Date:           Sun Jul 23 12:20:46 UTC 2017

Modified Files:
        pkgsrc/mk: ocaml.mk

Log Message:
Adding jbuilder support to ocaml.mk


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 pkgsrc/mk/ocaml.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/ocaml.mk
diff -u pkgsrc/mk/ocaml.mk:1.12 pkgsrc/mk/ocaml.mk:1.13
--- pkgsrc/mk/ocaml.mk:1.12     Tue Jul 11 09:54:21 2017
+++ pkgsrc/mk/ocaml.mk  Sun Jul 23 12:20:46 2017
@@ -1,4 +1,4 @@
-# $NetBSD: ocaml.mk,v 1.12 2017/07/11 09:54:21 jaapb Exp $
+# $NetBSD: ocaml.mk,v 1.13 2017/07/23 12:20:46 jaapb Exp $
 #
 # This Makefile fragment handles the common variables used by OCaml packages.
 #
@@ -26,6 +26,8 @@
 # package uses OPAM
 # OCAML_USE_TOPKG
 # package uses topkg [implies OCAML_USE_FINDLIB]
+# OCAML_USE_JBUILDER
+# package uses jbuilder [implies OCAML_USE_OPAM]
 # OCAML_TOPKG_DOCDIR
 # different targets for topkg (bytecode, optional bytecode, native)
 # OASIS_BUILD_ARGS
@@ -47,8 +49,16 @@ _PKG_VARS.ocaml=     \
        OCAML_FINDLIB_REGISTER \
        OCAML_USE_OASIS \
        OCAML_USE_OASIS_DYNRUN \
+       OASIS_BUILD_ARGS \
        OCAML_USE_OPAM \
        OCAML_USE_TOPKG \
+       OCAML_TOPKG_NAME \
+       OCAML_TOPKG_DOCDIR \
+       OCAML_TOPKG_TARGETS \
+       OCAML_TOPKG_OPTIONAL_TARGETS \
+       OCAML_USE_JBUILDER \
+       JBUILDER_BUILD_FLAGS \
+       JBUILDER_BUILD_TARGETS \
        OCAML_BUILD_ARGS
 _DEF_VARS.ocaml=       \
        OCAML_USE_OPT_COMPILER
@@ -70,6 +80,9 @@ OCAML_USE_OPAM?= no
 # Default value of OCAML_USE_TOPKG
 OCAML_USE_TOPKG?=      no
 
+# Default value of OCAML_USE_JBUILDER
+OCAML_USE_JBUILDER?=   no
+
 OCAML_TOPKG_NAME?=     ${PKGBASE:S/^ocaml-//}
 OCAML_TOPKG_DOCDIR?=   ${PREFIX}/share/doc
 
@@ -79,6 +92,9 @@ OCAML_TOPKG_TARGETS?= # empty
 OCAML_TOPKG_OPTIONAL_TARGETS?= # empty
 OCAML_TOPKG_NATIVE_TARGETS?=   # empty
 
+JBUILDER_BUILD_FLAGS?= # empty
+JBUILDER_BUILD_TARGETS?=       @install
+
 # Default value of OASIS_BUILD_ARGS
 OASIS_BUILD_ARGS?=     # empty
 
@@ -127,6 +143,12 @@ OCAML_USE_FINDLIB= yes
 INSTALLATION_DIRS+=    ${OCAML_SITELIBDIR}/${OCAML_TOPKG_NAME}
 .endif
 
+# Configure stuff for JBUILDER
+.if ${OCAML_USE_JBUILDER} == "yes"
+.include "../../devel/ocaml-jbuilder/buildlink3.mk"
+OCAML_USE_OPAM=        yes
+.endif
+
 # Value for OCAML_SITELIBDIR
 OCAML_SITELIBDIR=      lib/ocaml/site-lib
 MAKE_ENV+=     OCAML_SITELIBDIR="${OCAML_SITELIBDIR}"
@@ -211,6 +233,17 @@ do-install:
 
 .endif # topkg-opam
 
+#
+# jbuilder targets
+#
+.if ${OCAML_USE_JBUILDER} == "yes"
+
+do-build:
+       ${RUN} cd ${WRKSRC} && jbuilder build -j ${MAKE_JOBS} \
+               ${JBUILDER_BUILD_FLAGS} ${JBUILDER_BUILD_TARGETS}
+
+.endif # topkg-jbuilder
+
 # Add dependency on ocaml.
 .include "../../lang/ocaml/buildlink3.mk"
 



Home | Main Index | Thread Index | Old Index