Subject: Re: JFLAG support
To: None <tech-userlevel@netbsd.org>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: tech-userlevel
Date: 12/17/1998 14:14:32
On Nov 29, Manuel Bouyer wrote
>
> Hi,
> does anyone object if I commit the following changes to src/Makefile ?
> This allow to use parallel commands for 'make build'. The user just has
> to put , e.g '-j3' in JFLAG to run 3 commands in parallel when possible.
>
> Using '-j6' on my cyrix 133Mhz cut down the time of a compile by about 30% ...
>
Ok, I changed this to just put the number of parallel jobs in JFLAG,
the makefile will automagically add the '-j' in front of it if needed.
If I don't get any objections I'll commit this sunday or monday ...
--
Manuel Bouyer, LIP6, Universite Paris VI. Manuel.Bouyer@lip6.fr
--
Index: Makefile
===================================================================
RCS file: /cvsroot/src/Makefile,v
retrieving revision 1.74
diff -u -r1.74 Makefile
--- Makefile 1998/12/07 01:42:34 1.74
+++ Makefile 1998/12/17 13:13:41
@@ -4,6 +4,10 @@
HAVE_GCC28!= ${CXX} --version | egrep "^(2\.8|egcs)" ; echo
+.if defined(JFLAG)
+_J= -j${JFLAG}
+.endif
+
# NOTE THAT etc *DOES NOT* BELONG IN THE LIST BELOW
SUBDIR+= lib include bin libexec sbin usr.bin usr.sbin share sys
@@ -62,22 +66,22 @@
false
.else
(cd ${.CURDIR}/gnu/usr.bin/egcs && \
- ${MAKE} depend && ${MAKE} NOMAN= && ${MAKE} NOMAN= install && \
- ${MAKE} cleandir)
+ ${MAKE} depend && ${MAKE} ${_J} NOMAN= && \
+ ${MAKE} NOMAN= install && ${MAKE} cleandir)
.endif
.endif
${MAKE} includes
(cd ${.CURDIR}/lib/csu && \
- ${MAKE} depend && ${MAKE} NOMAN= && ${MAKE} NOMAN= install)
+ ${MAKE} depend && ${MAKE} ${_J} NOMAN= && ${MAKE} NOMAN= install)
(cd ${.CURDIR}/lib && \
- ${MAKE} depend && ${MAKE} NOMAN= && ${MAKE} NOMAN= install)
+ ${MAKE} depend && ${MAKE} ${_J} NOMAN= && ${MAKE} NOMAN= install)
(cd ${.CURDIR}/gnu/lib && \
- ${MAKE} depend && ${MAKE} NOMAN= && ${MAKE} NOMAN= install)
+ ${MAKE} depend && ${MAKE} ${_J} NOMAN= && ${MAKE} NOMAN= install)
.if !defined(USE_EGCS)
.if (${MACHINE_ARCH} != "alpha") && \
(${MACHINE_ARCH} != "powerpc")
(cd ${.CURDIR}/gnu/usr.bin/gcc/libgcc && \
- ${MAKE} depend && ${MAKE} NOMAN= && ${MAKE} NOMAN= install)
+ ${MAKE} depend && ${MAKE} ${_J} NOMAN= && ${MAKE} NOMAN= install)
.endif
.endif
.if exists(domestic) && !defined(EXPORTABLE_SYSTEM)
@@ -85,20 +89,20 @@
# libcom_err.
.if exists(domestic/lib/libdes)
(cd ${.CURDIR}/domestic/lib/libdes && \
- ${MAKE} depend && ${MAKE} NOMAN= && ${MAKE} NOMAN= install)
+ ${MAKE} depend && ${MAKE} ${_J} NOMAN= && ${MAKE} NOMAN= install)
.endif
.if exists(domestic/lib/libcom_err)
(cd ${.CURDIR}/domestic/lib/libcom_err && \
- ${MAKE} depend && ${MAKE} NOMAN= && ${MAKE} NOMAN= install)
+ ${MAKE} depend && ${MAKE} ${_J} NOMAN= && ${MAKE} NOMAN= install)
.endif
.if exists(domestic/lib/libkrb)
(cd ${.CURDIR}/domestic/lib/libkrb && \
- ${MAKE} depend && ${MAKE} NOMAN= && ${MAKE} NOMAN= install)
+ ${MAKE} depend && ${MAKE} ${_J} NOMAN= && ${MAKE} NOMAN= install)
.endif
(cd ${.CURDIR}/domestic/lib && \
- ${MAKE} depend && ${MAKE} NOMAN= && ${MAKE} NOMAN= install)
+ ${MAKE} depend && ${MAKE} ${_J} NOMAN= && ${MAKE} NOMAN= install)
.endif
- ${MAKE} depend && ${MAKE} && ${MAKE} install
+ ${MAKE} depend && ${MAKE} ${_J} && ${MAKE} install
@echo -n "Build finished at: "
@date