Fri Jul 26 09:59:27 2019 UTC ()
mk/ocaml.mk: don't assume MAKE_JOBS is defined


(tnn)
diff -r1.25 -r1.26 pkgsrc/mk/ocaml.mk

cvs diff -r1.25 -r1.26 pkgsrc/mk/Attic/ocaml.mk (expand / switch to unified diff)

--- pkgsrc/mk/Attic/ocaml.mk 2019/07/15 09:36:26 1.25
+++ pkgsrc/mk/Attic/ocaml.mk 2019/07/26 09:59:27 1.26
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: ocaml.mk,v 1.25 2019/07/15 09:36:26 jaapb Exp $ 1# $NetBSD: ocaml.mk,v 1.26 2019/07/26 09:59:27 tnn Exp $
2# 2#
3# This Makefile fragment handles the common variables used by OCaml packages. 3# This Makefile fragment handles the common variables used by OCaml packages.
4# 4#
5# Build def variables: 5# Build def variables:
6# OCAML_USE_OPT_COMPILER  6# OCAML_USE_OPT_COMPILER
7# if set to yes, will enable optimised (native code) compilation 7# if set to yes, will enable optimised (native code) compilation
8# default value: depends on architecture 8# default value: depends on architecture
9# 9#
10# PLIST variable: 10# PLIST variable:
11# PLIST.ocaml-opt for files only installed when using the optimised compiler 11# PLIST.ocaml-opt for files only installed when using the optimised compiler
12# Set based on OCAML_USE_OPT_COMPILER 12# Set based on OCAML_USE_OPT_COMPILER
13#  13#
14# Package-settable variables: 14# Package-settable variables:
@@ -260,47 +260,47 @@ do-install: @@ -260,47 +260,47 @@ do-install:
260 $$i.install; \ 260 $$i.install; \
261 done 261 done
262 262
263.endif # opam 263.endif # opam
264 264
265# 265#
266# jbuilder targets 266# jbuilder targets
267# 267#
268.if ${OCAML_USE_JBUILDER} == "yes" 268.if ${OCAML_USE_JBUILDER} == "yes"
269 269
270do-build: 270do-build:
271.if !empty(JBUILDER_BUILD_PACKAGES) 271.if !empty(JBUILDER_BUILD_PACKAGES)
272 ${RUN} ${_ULIMIT_CMD} \ 272 ${RUN} ${_ULIMIT_CMD} \
273 cd ${WRKSRC} && jbuilder build -j ${MAKE_JOBS} \ 273 cd ${WRKSRC} && jbuilder build -j ${MAKE_JOBS:U1} \
274 ${JBUILDER_BUILD_FLAGS} -p ${JBUILDER_BUILD_PACKAGES:ts,} \ 274 ${JBUILDER_BUILD_FLAGS} -p ${JBUILDER_BUILD_PACKAGES:ts,} \
275 ${JBUILDER_BUILD_TARGETS} 275 ${JBUILDER_BUILD_TARGETS}
276.else 276.else
277 ${RUN} ${_ULIMIT_CMD} \ 277 ${RUN} ${_ULIMIT_CMD} \
278 cd ${WRKSRC} && jbuilder build -j ${MAKE_JOBS} \ 278 cd ${WRKSRC} && jbuilder build -j ${MAKE_JOBS:U1} \
279 ${JBUILDER_BUILD_FLAGS} ${JBUILDER_BUILD_TARGETS} 279 ${JBUILDER_BUILD_FLAGS} ${JBUILDER_BUILD_TARGETS}
280.endif 280.endif
281 281
282.endif # jbuilder 282.endif # jbuilder
283 283
284# 284#
285# dune targets 285# dune targets
286# 286#
287.if ${OCAML_USE_DUNE} == "yes" 287.if ${OCAML_USE_DUNE} == "yes"
288 288
289do-build: 289do-build:
290.if !empty(DUNE_BUILD_PACKAGES) 290.if !empty(DUNE_BUILD_PACKAGES)
291 ${RUN} ${_ULIMIT_CMD} \ 291 ${RUN} ${_ULIMIT_CMD} \
292 cd ${WRKSRC} && dune build -j ${MAKE_JOBS} \ 292 cd ${WRKSRC} && dune build -j ${MAKE_JOBS:U1} \
293 ${DUNE_BUILD_FLAGS} -p ${DUNE_BUILD_PACKAGES:ts,} \ 293 ${DUNE_BUILD_FLAGS} -p ${DUNE_BUILD_PACKAGES:ts,} \
294 ${DUNE_BUILD_TARGETS} 294 ${DUNE_BUILD_TARGETS}
295.else 295.else
296 ${RUN} ${_ULIMIT_CMD} \ 296 ${RUN} ${_ULIMIT_CMD} \
297 cd ${WRKSRC} && dune build --profile release -j ${MAKE_JOBS} \ 297 cd ${WRKSRC} && dune build --profile release -j ${MAKE_JOBS:U1} \
298 ${DUNE_BUILD_FLAGS} ${DUNE_BUILD_TARGETS} 298 ${DUNE_BUILD_FLAGS} ${DUNE_BUILD_TARGETS}
299.endif 299.endif
300 300
301.endif # dune 301.endif # dune
302 302
303# Add dependency on ocaml. 303# Add dependency on ocaml.
304.include "../../lang/ocaml/buildlink3.mk" 304.include "../../lang/ocaml/buildlink3.mk"
305 305
306.endif # OCAML_MK 306.endif # OCAML_MK