From owner-freebsd-ports-bugs@freebsd.org Sun Jan 15 02:43:53 2017 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A911CCAE6B0 for ; Sun, 15 Jan 2017 02:43:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 985B718EA for ; Sun, 15 Jan 2017 02:43:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v0F2hrro021034 for ; Sun, 15 Jan 2017 02:43:53 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 213446] Configurable verbose build output Date: Sun, 15 Jan 2017 02:43:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Ports Framework X-Bugzilla-Version: Latest X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: lightside@gmx.com X-Bugzilla-Status: Closed X-Bugzilla-Resolution: Works As Intended X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: portmgr@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jan 2017 02:43:53 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D213446 --- Comment #25 from lightside --- Created attachment 178899 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D178899&action= =3Dedit The custom.bsd.port.mk file to use for BSDPORTMK variable People, who interested to solve this issue on user level, may create wrappe= rs for build utilities. For example: cmake: -8<-- #!/bin/sh if [ -z "$ALLOW_VERBOSE" ] || [ -n "$LESS_VERBOSE" ]; then args=3D$(echo -n "$@" | sed 's/-\//gI') elif [ -n "$FLAG_VERBOSE" ]; then args=3D"$@ $FLAG_VERBOSE" else args=3D"$@" fi /path/to/cmake $args -->8- gmake (but some issue(s) possible with VPATH): -8<-- #!/bin/sh if [ -z "$ALLOW_VERBOSE" ] || [ -n "$LESS_VERBOSE" ]; then args=3D$(echo -n "$@" | sed 's/\//gI ; s/\//gI') unset BUILD_VERBOSE V VERBOSE elif [ -n "$FLAG_VERBOSE" ]; then args=3D"$@ $FLAG_VERBOSE" else args=3D"$@" fi /path/to/gmake $args -->8- ninja: -8<-- #!/bin/sh if [ -z "$ALLOW_VERBOSE" ] || [ -n "$LESS_VERBOSE" ]; then args=3D$(echo -n "$@" | sed 's/-\//g') elif [ -n "$FLAG_VERBOSE" ]; then args=3D"$@ $FLAG_VERBOSE" else args=3D"$@" fi /path/to/ninja $args -->8- Also, there is a possibility to define BSDPORTMK variable (e.g. BSDPORTMK=3D/path/to/custom.bsd.port.mk in /etc/make.conf file) with path to custom bsd.port.mk file, which filters needed variables (or for some other purposes): custom.bsd.port.mk: -8<-- .include "${PORTSDIR}/Mk/bsd.port.mk" .ifndef ALLOW_VERBOSE .if !defined(_SET_LATE_CONFIGURE_ARGS_CHANGED) && defined(GNU_CONFIGURE) && defined(SET_LATE_CONFIGURE_ARGS) _SET_LATE_CONFIGURE_ARGS_CHANGED=3D yes SET_LATE_CONFIGURE_ARGS+=3D \ if [ ! -z "`${CONFIGURE_CMD} --help 2>&1 | ${GREP} -- '--enable-silent-rules'`" ]; then \ _LATE_CONFIGURE_ARGS=3D"$${_LATE_CONFIGURE_ARGS} --enable-silent-ru= les" ; fi ; .endif .if !defined(_CMAKE_ARGS_CHANGED) && defined(_INCLUDE_USES_CMAKE_MK) && defined(CMAKE_ARGS) _CMAKE_ARGS_CHANGED=3D yes CMAKE_ARGS+=3D -DCMAKE_VERBOSE_MAKEFILE:BOOL=3DOFF .endif .if !defined(_NINJA_MAKE_ARGS_CHANGED) && defined(_INCLUDE_USES_NINJA_MK) && defined(MAKE_ARGS) _NINJA_MAKE_ARGS_CHANGED=3D yes MAKE_ARGS:=3D ${MAKE_ARGS:N-v} .endif .if !defined(_WAF_MAKE_ARGS_CHANGED) && defined(_INCLUDE_USES_WAF_MK) && defined(MAKE_ARGS) _WAF_MAKE_ARGS_CHANGED=3D yes MAKE_ARGS:=3D ${MAKE_ARGS:N--verbose} .endif .if !defined(_QMAKE_ARGS_CHANGED) && defined(_INCLUDE_USES_QMAKE_MK) && defined(QMAKE_VERBOSE) && defined(QMAKE_ARGS) _QMAKE_ARGS_CHANGED=3D yes QMAKE_ARGS:=3D ${QMAKE_ARGS:N-d} .endif .endif -->8- This was possible because of https://svnweb.freebsd.org/base/head/share/mk/bsd.port.mk?revision=3D287436= &view=3Dmarkup#l20 -8<-- BSDPORTMK?=3D ${PORTSDIR}/Mk/bsd.port.mk -->8- For example, I found this useful for waf build system, where mutlimedia/mpv port builds 8 times faster (on my configuration) with less verbose build output, compared to full verbose build output: -8<-- # time make -C /usr/ports/multimedia/mpv build <...> 88.732u 16.573s 0:36.56 288.0% 19218+338k 1+62io 0pf+0w # make -C /usr/ports/multimedia/mpv clean <...> # time make -C /usr/ports/multimedia/mpv ALLOW_VERBOSE=3D1 build 331.393u 43.463s 4:53.40 127.7% 5144+212k 0+62io 0pf+0w -->8- Build times for other systems may vary (or almost the same). I attached custom.bsd.port.mk file, just in case, but its contents may be outdated by changes in ports framework. Therefore, you may use it on your o= wn risk. --=20 You are receiving this mail because: You are on the CC list for the bug.=