From owner-freebsd-current@FreeBSD.ORG Thu Dec 1 07:15:13 2011 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 409451065688; Thu, 1 Dec 2011 07:15:13 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 2451B8FC27; Thu, 1 Dec 2011 07:15:11 +0000 (UTC) Received: by yenq9 with SMTP id q9so2220183yen.13 for ; Wed, 30 Nov 2011 23:15:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=mb3REwJ9Ar5gyZvQwElp6xkDQFheBt7jA1188hZxwvc=; b=LWP7hXDWnxIIDUukHZXynShyvMKkll7DaE3spxGat3u1XTqUnxu2mUOjnHpdqzoNoU Q4ug+x3WiWbgU+QamxxOdQ1x3rgKdEhkyG0jZDMKks+1FIWD9ug26V5oBF1pjo2aP3yw rox/AEME17oRgwh5t6OF2sSEVcOLKOsZJQtzc= MIME-Version: 1.0 Received: by 10.182.172.41 with SMTP id az9mr1202333obc.42.1322723711429; Wed, 30 Nov 2011 23:15:11 -0800 (PST) Received: by 10.182.62.227 with HTTP; Wed, 30 Nov 2011 23:15:11 -0800 (PST) In-Reply-To: References: <201111291607.26546.jhb@freebsd.org> <20111201002515.GA50028@freebsd.org> <20111201014349.GA61475@freebsd.org> Date: Wed, 30 Nov 2011 23:15:11 -0800 Message-ID: From: Garrett Cooper To: Alexander Best Content-Type: multipart/mixed; boundary=e89a8f83a729f4ab1e04b3029cdd Cc: Doug Barton , current@freebsd.org, Warner Losh Subject: Re: Remove debug echo X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 01 Dec 2011 07:15:13 -0000 --e89a8f83a729f4ab1e04b3029cdd Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Wed, Nov 30, 2011 at 5:59 PM, Garrett Cooper wrote: > On Wed, Nov 30, 2011 at 5:43 PM, Alexander Best wro= te: >> On Wed Nov 30 11, Garrett Cooper wrote: >>> On Wed, Nov 30, 2011 at 4:25 PM, Alexander Best w= rote: >>> > On Tue Nov 29 11, Warner Losh wrote: >>> >> kill it. >>> >> >>> >> Warner >>> >> On Nov 29, 2011, at 2:07 PM, John Baldwin wrote: >>> >> >>> >> > Any objections to this? =A0It removes a weird line during 'make -s= buildworld' >>> >> > output and I think it was debugging accidentally left in in 213077= by Warner: >>> >> > >>> >> > Index: newvers.sh >>> >> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> >> > --- newvers.sh =A0 =A0 =A0(revision 228074) >>> >> > +++ newvers.sh =A0 =A0 =A0(working copy) >>> >> > @@ -99,7 +99,6 @@ for dir in /bin /usr/bin /usr/local/bin; do >>> >> > done >>> >> > >>> >> > if [ -n "$svnversion" ] ; then >>> >> > - =A0 echo "$svnversion" >>> >> > =A0 =A0 svn=3D`cd ${SYSDIR} && $svnversion` >>> >> > =A0 =A0 case "$svn" in >>> >> > =A0 =A0 [0-9]*) svn=3D" r${svn}" ;; >>> > >>> > also... >>> > >>> > when running buildkernel via 'make -s', do we really need all those m= odule >>> > printfs? i see messages for "cleandir", "obj", "depend" and "all". i = think for >>> > 'make -s', that's pure overkill! >>> > >>> > for a GENERIC kernel, 'make' enters ~ 670 module dirs. take that time= s 4 and >>> > you'll get 2680 lines of output. not really *silent*, is it? ;) >>> >>> =A0 =A0 pmake sucks as far as diagnostic output is concerned when compa= red >>> with gmake. I'd rather not have to fish through with -j1 (if I'm lucky >>> and it's not a race) to determine what directory created the "Error >>> Code" output. With the printouts discussed here, at least you have a >>> chance at determining what the issue was. >>> =A0 =A0 Maybe it's just me, but I like noisy builds -- otherwise the >>> amount of time I have to spend root-causing the issue becomes >>> expensive. >> >> ehmmm...a noisy silent flag? i totally agree, if we're talking about 'ma= ke' in >> its default mode, but what's the point of a silent flag, if it produces = > 2500 >> lines of output? nobody uses the -s flag for diagnostics. its purpose is= to >> build a kernel without producing a lot of output and also not fiddling w= ith >> stdout/stderr to achieve that goal. > > What I really want is this: > > $ cat Makefile > all: foo bar baz yadda > > foo bar yadda: > > baz: > =A0 =A0 =A0 =A0false > $ gmake > false > gmake: *** [baz] Error 1 > =A0 =A0 =A0 =A0 =A0 =A0 ^^^^ > $ make all > false > *** Error code 1 > > Stop in /tmp. > > Otherwise diagnosing issues becomes a PITA with -j > 1 (with pmake I > have to start using some serious grep'ing, and if I'm lucky I can find > the source of error). If I get a few spare cycles I might just > implement it and post a patch somewhere (the entering and leaving > directory feature of gmake is really nice too, but it's less > important.. unless you have the same target in multiple directories).. I've attached a patch that makes make do what I would like it to do; there are some other items that require cleanup to achieve the `argv0' prefixing that's available in gmake, but this is good enough for a meaningful traceback when things fail. Pastebin available here, just in case the mailing list eats my patch: http://pastebin.com/dFqcDRfv $ cat ~/Makefile all: cd $$HOME/foo; ${MAKE} $@ $ cat ~/foo/Makefile all: foo bar barf yadda foo bar yadda: @true baz: @false barf: baz $ $PWD/make -j4 -f ~/Makefile all cd $HOME/foo; /usr/src/usr.bin/make/make all *** [baz] Error code 1 1 error *** [all] Error code 2 1 error $ If someone would please, PLEASE commit this.. I will give you beer, or wine, or a copy of Skyrim, or a few months subscription to WoW, or something else of value to you that we could negotiate :)... I'm quite frankly tired of having to playing guessing games fishing through logs trying to determine build errors on FreeBSD if and when they do occur with pmake, and I'm sure that a number of developers and build/release engineers out there are in the same boat as I am. Thanks, -Garrett --e89a8f83a729f4ab1e04b3029cdd Content-Type: application/octet-stream; name="more-meaningful-make-errors.patch" Content-Disposition: attachment; filename="more-meaningful-make-errors.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gvnf5kb40 SW5kZXg6IHVzci5iaW4vbWFrZS9qb2IuYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSB1c3IuYmluL21ha2Uvam9i LmMJKHJldmlzaW9uIDIyODEwNykKKysrIHVzci5iaW4vbWFrZS9qb2IuYwkod29ya2luZyBjb3B5 KQpAQCAtOTU0LDE3ICs5NTQsMTggQEAKIAkJCQkJCWxhc3ROb2RlID0gam9iLT5ub2RlOwogCQkJ CQl9CiAJCQkJCWZwcmludGYob3V0LAotCQkJCQkgICAgIioqKiBDb21wbGV0ZWQgc3VjY2Vzc2Z1 bGx5XG4iKTsKKwkJCQkJICAgICIqKiogWyVzXSBDb21wbGV0ZWQgc3VjY2Vzc2Z1bGx5XG4iLAor CQkJCQkgICAgam9iLT5ub2RlLT5uYW1lKTsKIAkJCQl9CiAJCQl9IGVsc2UgewogCQkJCWlmICh1 c2VQaXBlcyAmJiBqb2ItPm5vZGUgIT0gbGFzdE5vZGUpIHsKLQkJCQkJTUVTU0FHRShvdXQsIGpv Yi0+bm9kZSk7CiAJCQkJCWxhc3ROb2RlID0gam9iLT5ub2RlOwogCQkJCX0KLQkJCQlmcHJpbnRm KG91dCwgIioqKiBFcnJvciBjb2RlICVkJXNcbiIsCisJCQkJZnByaW50ZihvdXQsICIqKiogWyVz XSBFcnJvciBjb2RlICVkJXNcbiIsCisJCQkJCWpvYi0+bm9kZS0+bmFtZSwKIAkJCQkJV0VYSVRT VEFUVVMoKnN0YXR1cyksCiAJCQkJCShqb2ItPmZsYWdzICYg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