pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk Add experimental support for -j jobs building in th...
details: https://anonhg.NetBSD.org/pkgsrc/rev/6b5ed4b0577c
branches: trunk
changeset: 519583:6b5ed4b0577c
user: reed <reed%pkgsrc.org@localhost>
date: Thu Oct 05 23:35:23 2006 +0000
description:
Add experimental support for -j jobs building in the build
target.
MAKE_JOBS is undefined by default. You can test this by setting
in mk.conf: MAKE_JOBS=5 for example.
Some package just won't build correctly with this -- these individual
packages can set MAKE_JOBS_SAFE=no to disable it.
This is based on discussion from last December 2005. Some pkgsrc
users are using ideas like this.
Note I have been using this since December 2005 on various single
processor and multiprocessor systems. (Once I kept some stats on
performance but have misplaced that now.) I haved tested this with
many packages (but not a bulk build) on Linux, NetBSD and DragonFly.
This commit doesn't include the commits for the MAKE_JOB_SAFE. As
this is experimental it needs more testing. Some examples of problems
are: comms/lrzsz, databases/gramps2, editors/vim, graphics/MesaLib,
graphics/netpbm, net/bind9, print/ghostscript-esp, textproc/libxml,
and www/lynx.
diffstat:
mk/build/build.mk | 12 +++++++++---
mk/defaults/mk.conf | 10 +++++++++-
2 files changed, 18 insertions(+), 4 deletions(-)
diffs (57 lines):
diff -r b26556073b82 -r 6b5ed4b0577c mk/build/build.mk
--- a/mk/build/build.mk Thu Oct 05 22:20:13 2006 +0000
+++ b/mk/build/build.mk Thu Oct 05 23:35:23 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: build.mk,v 1.6 2006/09/09 02:35:13 obache Exp $
+# $NetBSD: build.mk,v 1.7 2006/10/05 23:35:23 reed Exp $
#
# BUILD_MAKE_FLAGS is the list of arguments that is passed to the make
# process.
@@ -9,6 +9,12 @@
BUILD_MAKE_FLAGS?= ${MAKE_FLAGS}
BUILD_TARGET?= all
+.if defined(MAKE_JOBS_SAFE) && !empty(MAKE_JOBS_SAFE:M[nN][oO])
+_MAKE_JOBS= # nothing
+.elif defined(MAKE_JOBS)
+_MAKE_JOBS= -j${MAKE_JOBS}
+.endif
+
######################################################################
### build (PUBLIC)
######################################################################
@@ -96,8 +102,8 @@
. for _dir_ in ${BUILD_DIRS}
${_PKG_SILENT}${_PKG_DEBUG}${_ULIMIT_CMD} \
cd ${WRKSRC} && cd ${_dir_} && \
- ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${BUILD_MAKE_FLAGS} \
- -f ${MAKE_FILE} ${BUILD_TARGET}
+ ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${_MAKE_JOBS} \
+ ${BUILD_MAKE_FLAGS} -f ${MAKE_FILE} ${BUILD_TARGET}
. endfor
.endif
diff -r b26556073b82 -r 6b5ed4b0577c mk/defaults/mk.conf
--- a/mk/defaults/mk.conf Thu Oct 05 22:20:13 2006 +0000
+++ b/mk/defaults/mk.conf Thu Oct 05 23:35:23 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mk.conf,v 1.131 2006/09/27 15:18:15 joerg Exp $
+# $NetBSD: mk.conf,v 1.132 2006/10/05 23:35:23 reed Exp $
#
# This file provides default values for variables that may be overridden
@@ -36,6 +36,14 @@
# Possible: -[0-9], --fast, --best (see gzip(1))
# Default: -9
+#MAKE_JOBS= 3
+# Set to maximum number of jobs ("make -j") for make to run at one time.
+# Possible: a positive integer (e.g. 17)
+# Default: not defined
+# Note that this is in testing. Some packages will not build with this.
+# Disabling this for an individual package can be done by setting
+# MAKE_JOBS_SAFE=NO within the per package Makefile.
+
#MKCRYPTO= no
# If not YES or yes, don't fetch, build or install crypto packages.
# Possible: not defined, no
Home |
Main Index |
Thread Index |
Old Index