From owner-freebsd-current@FreeBSD.ORG Thu Dec 1 18:27:23 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 C0E61106564A for ; Thu, 1 Dec 2011 18:27:23 +0000 (UTC) (envelope-from fjoe@samodelkin.net) Received: from mail-qw0-f47.google.com (mail-qw0-f47.google.com [209.85.216.47]) by mx1.freebsd.org (Postfix) with ESMTP id 81C708FC17 for ; Thu, 1 Dec 2011 18:27:23 +0000 (UTC) Received: by qaea17 with SMTP id a17so5085712qae.13 for ; Thu, 01 Dec 2011 10:27:22 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.16.101 with SMTP id f5mr1608826obd.33.1322762393491; Thu, 01 Dec 2011 09:59:53 -0800 (PST) Received: by 10.182.76.225 with HTTP; Thu, 1 Dec 2011 09:59:53 -0800 (PST) X-Originating-IP: [80.89.199.122] In-Reply-To: References: <201111291607.26546.jhb@freebsd.org> <20111201002515.GA50028@freebsd.org> <20111201014349.GA61475@freebsd.org> Date: Thu, 1 Dec 2011 23:59:53 +0600 Message-ID: From: Max Khon To: Garrett Cooper Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Alexander Best , 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 18:27:23 -0000 Garrett, On Thu, Dec 1, 2011 at 2:15 PM, Garrett Cooper wrote: > What I really want is this: > > > > $ cat Makefile > > all: foo bar baz yadda > > > > foo bar yadda: > > > > baz: > > false > > $ gmake > > false > > gmake: *** [baz] Error 1 > > ^^^^ > > $ 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. > I hit the same problem regularly. The patch looks good to me as well. Max