summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authortron <tron>2002-01-04 12:00:56 +0000
committertron <tron>2002-01-04 12:00:56 +0000
commitc13d1545c4b8c209a70ccaedf0d974cb64c1fa84 (patch)
tree71254b332f1a13f7e4bc89f5a8ba35f5db043545 /mk
parent06fb380727c5d40612848c3a02fda631bd45e84b (diff)
downloadpkgsrc-c13d1545c4b8c209a70ccaedf0d974cb64c1fa84.tar.gz
Add a new variable "UNLIMIT_RESOURCES" which can be used to raise process
limits for building a package.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk12
1 files changed, 10 insertions, 2 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index c31430ee917..0b49211a598 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.886 2001/12/23 19:32:15 jlam Exp $
+# $NetBSD: bsd.pkg.mk,v 1.887 2002/01/04 12:00:56 tron Exp $
#
# This file is in the public domain.
#
@@ -231,6 +231,14 @@ DEPENDS+= ncurses>=5.0:../../devel/ncurses
DEPENDS+= gtexinfo-3.12:../../devel/gtexinfo
.endif
+# Automatically increase process limit where necessary for building.
+_ULIMIT_CMD=
+.if defined(UNLIMIT_RESOURCES)
+.for _LIMIT in $(UNLIMIT_RESOURCES)
+_ULIMIT_CMD+= ulimit -${_LIMIT} `ulimit -H -${_LIMIT}`;
+.endfor
+.endif
+
# -lintl in CONFIGURE_ENV is to workaround broken gettext.m4
# (gettext.m4 does not add -lintl where it should, and fails to detect
# if libintl.a is genuine GNU gettext or not).
@@ -1709,7 +1717,7 @@ post-configure: ${_CONFIGURE_POSTREQ}
.if !target(do-build)
do-build:
- ${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} -f ${MAKEFILE} ${ALL_TARGET}
+ ${_PKG_SILENT}${_PKG_DEBUG}${_ULIMIT_CMD}cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} -f ${MAKEFILE} ${ALL_TARGET}
.endif
# Install