From owner-freebsd-current@FreeBSD.ORG Sun Dec 15 05:42:45 2013 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 227FB871 for ; Sun, 15 Dec 2013 05:42:45 +0000 (UTC) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id D9C401A4D for ; Sun, 15 Dec 2013 05:42:44 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id EB2427300A; Sun, 15 Dec 2013 06:45:29 +0100 (CET) Date: Sun, 15 Dec 2013 06:45:29 +0100 From: Luigi Rizzo To: current@freebsd.org Subject: 'silent' kernel builds ? Message-ID: <20131215054529.GB99455@onelab2.iet.unipi.it> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Dec 2013 05:42:45 -0000 Hi, I was trying to make buildkernel a bit quieter (just listing the name of the file being compiled). I hoped to modify the " .c.o: " rules in share/sys.mk but apparently kernel builds generate their own Makefile using definitions in sys/conf/kern.pre.mk . As a result, a patch like the one below gets most of the work done (a few extra bits are necessary to mask the awk calls, and the 'irregular' compiler invocations). However I could not found the rule definition used to build modules, any idea where to look ? And finally, is there interest in this feature ? cheers luigi Index: head/sys/conf/kern.pre.mk =================================================================== --- head/sys/conf/kern.pre.mk (revision 258360) +++ head/sys/conf/kern.pre.mk (working copy) @@ -126,7 +126,12 @@ # Optional linting. This can be overridden in /etc/make.conf. LINTFLAGS= ${LINTOBJKERNFLAGS} -NORMAL_C= ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.IMPSRC} +.if defined(SILENT) +SILENT_MAKE= @ +SILENT_GCC= @printf "%s\n" "--- Building ${.IMPSRC} -------"; +.endif + +NORMAL_C= ${SILENT_GCC} ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.IMPSRC} NORMAL_S= ${CC} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC} PROFILE_C= ${CC} -c ${CFLAGS} ${WERROR} ${.IMPSRC} NORMAL_C_NOWERROR= ${CC} -c ${CFLAGS} ${PROF} ${.IMPSRC} @@ -146,7 +151,7 @@ ZFS_S= ${CC} -c ${ZFS_ASM_CFLAGS} ${WERROR} ${.IMPSRC} .if ${MK_CTF} != "no" -NORMAL_CTFCONVERT= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +NORMAL_CTFCONVERT= ${SILENT_MAKE} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .elif ${MAKE_VERSION} >= 5201111300 NORMAL_CTFCONVERT= .else