From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 25 16:30:58 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 409C9106564A for ; Fri, 25 Jun 2010 16:30:58 +0000 (UTC) (envelope-from mahan@mahan.org) Received: from ns.mahan.org (ns.mahan.org [67.116.10.138]) by mx1.freebsd.org (Postfix) with ESMTP id 1C93F8FC08 for ; Fri, 25 Jun 2010 16:30:57 +0000 (UTC) Received: from Gypsy.mahan.org (crowTrobot [67.116.10.140]) by ns.mahan.org (8.13.6/8.13.6) with ESMTP id o5PGVqB9064940; Fri, 25 Jun 2010 09:31:56 -0700 (PDT) (envelope-from mahan@mahan.org) Message-ID: <4C24D9BC.7030008@mahan.org> Date: Fri, 25 Jun 2010 09:30:52 -0700 From: Patrick Mahan User-Agent: Thunderbird 2.0.0.22 (X11/20090605) MIME-Version: 1.0 To: =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= References: <4C21A743.6040306@mahan.org> <86hbkujdto.fsf@ds4.des.no> <4C24A7B4.5050301@mahan.org> <86mxujdziz.fsf@ds4.des.no> In-Reply-To: <86mxujdziz.fsf@ds4.des.no> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: Help with some makefile hackery X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jun 2010 16:30:58 -0000 Oy vey! Good point! Not something I had considered (but should have). Is there a way to propogate that status through the pipe? I am using 'tee' so that the master build (which invokes the top-level make) can also see the make output. But going back and reading the man page on 'sh' shows me that on a pipline, the status is the status of the *last* command. Maybe I should do this instead? src-kernel: src-kernel-tools cd src; ./amd64-kernel.sh 2>&1 > build_amd64_kernel.log; \ tail -f build_amd64_kernel.log It is not too clear if the status is the last one in a compound command. I will give that a try. Thanks, Patrick Dag-Erling Sm=C3=B8rgrav wrote: > Patrick Mahan writes: >> In the top-level makefile I have the following label: >> >> src-kernel: src-kernel-tools >> cd src; ./amd64-kernel.sh 2>&1 | tee build_amd64_kernel.log >> >> If there is a build failure with the kernel, it can be seen in the >> file 'build_amd64_kernel.log'. However, the top-level make file just >> continues on to the next label as if no error occurs. >=20 > Make looks at tee's exit status, not the script's. >=20 > DES