Re: Help with some makefile hackery

2010-06-28 Thread Brian Somers
On Fri, 25 Jun 2010 05:57:24 -0700 Patrick Mahan wrote: > src-kernel: src-kernel-tools > cd src; ./amd64-kernel.sh 2>&1 | tee build_amd64_kernel.log I've had the same issue teeing make output for coverage measurements. A better way to write this might be src-kernel: src-kernel-tools

Re: Help with some makefile hackery

2010-06-26 Thread perryh
Patrick Mahan wrote: > 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. Someone already

Re: Help with some makefile hackery

2010-06-25 Thread Dag-Erling Smørgrav
Patrick Mahan writes: > 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. This won't work

Re: Help with some makefile hackery

2010-06-25 Thread Patrick Mahan
Jilles, Thanks for the more complicated example. I am always interested in shell hacks like these, especially when they involve interesting uses of file I/O redirection. The tee is there so that the master build package (a perl script) that builds not only my groups sources but other sources as

Re: Help with some makefile hackery

2010-06-25 Thread Patrick Mahan
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

Re: Help with some makefile hackery

2010-06-25 Thread Jilles Tjoelker
On Tue, Jun 22, 2010 at 11:18:43PM -0700, Patrick Mahan wrote: > src-kern-tools: > cd src; ./-kernel-toolchain.sh 2>&1 | tee The pipeline will return the status of 'tee' which is almost always 0. The exit status of the build script is ignored. A simple fix is store the status in a file and

Re: Help with some makefile hackery

2010-06-25 Thread Dag-Erling Smørgrav
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 t

Re: Help with some makefile hackery

2010-06-25 Thread Patrick Mahan
Dag-Erling, I am using option 3 below. I have the following in my shell: amd64-kernel.sh #!/bin/sh trap "exit 1" 1 2 3 15 export SRCROOT=`pwd -P` export MAKEOBJDIRPREFIX=$SRCROOT/../amd64/obj export SRCCONF=$SRCROOT/src.conf # Use our private copy export SECKNOB="-DPRIVATE" KERNCONF=TCONF ma

Re: Help with some makefile hackery

2010-06-23 Thread Dag-Erling Smørgrav
Patrick Mahan writes: > My issue is that if there is a build failure at any point, the > status does not seem to be propagated upward. For example, if > the kernel fails to build due to incorrect code, the script > -kernel64.sh stops (verifable by examining the logfile), > however, the make will

Help with some makefile hackery

2010-06-22 Thread Patrick Mahan
I have the following senerio - We need to build the kernel and world for multiple platforms architectures (amd64, mips, ppc, etc). Initially we had a set of shell scripts for the following: -kernel-toolchain.sh -kernel64.sh -world64.sh -bldpkg.sh Which set the correct environm