Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Jun 2010 09:30:52 -0700
From:      Patrick Mahan <mahan@mahan.org>
To:        =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= <des@des.no>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Help with some makefile hackery
Message-ID:  <4C24D9BC.7030008@mahan.org>
In-Reply-To: <86mxujdziz.fsf@ds4.des.no>
References:  <4C21A743.6040306@mahan.org> <86hbkujdto.fsf@ds4.des.no>	<4C24A7B4.5050301@mahan.org> <86mxujdziz.fsf@ds4.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help

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 <mahan@mahan.org> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C24D9BC.7030008>