Date: Sun, 15 Jan 2017 02:43:53 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 213446] Configurable verbose build output Message-ID: <bug-213446-13-sUJbt6iByq@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-213446-13@https.bugs.freebsd.org/bugzilla/> References: <bug-213446-13@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D213446 --- Comment #25 from lightside <lightside@gmx.com> --- 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/-\<DCMAKE_VERBOSE_MAKEFILE[:[:alnum:]]*=3D[[:alnum:]]*\>//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/\<V=3D[[:alnum:]]*\>//gI ; s/\<VERBOSE=3D[[:alnum:]]*\>//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/-\<v\>//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.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-213446-13-sUJbt6iByq>