Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Jun 2010 23:18:43 -0700
From:      Patrick Mahan <mahan@mahan.org>
To:        freebsd-hackers@freebsd.org
Subject:   Help with some makefile hackery
Message-ID:  <4C21A743.6040306@mahan.org>

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

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:

     <machine>-kernel-toolchain.sh
     <machine>-kernel64.sh
     <machine>-world64.sh
     <machine>-bldpkg.sh

Which set the correct environment variables before invoking the
FreeBSD makefile under src/.

As part of an effort to setup nightly builds and to make it easier
for people to build the kernels they needed, I created a top-level
makefile that goes something like -

all: src-kern-tools src-kernel src-world src-package

src-kern-tools:
     cd src; ./<machine>-kernel-toolchain.sh 2>&1 | tee <logfile>

src-kernel: src-kern-tools
     cd src; ./<machine>-kernel64.sh 2>&1 | tee <logfile>

.... and so on.

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
<machine>-kernel64.sh stops (verifable by examining the logfile),
however, the make will continue to the next target, src-world,
and continue building.  How do I propagate the status up to the
top-level make?  I've read through the PMake document but nothing
jumped out at me...  Any pointers would be appreciated.  The
build miser wants me to create status dot files that he then verifies
before moving on (yuck!).

Thanks for listening,

Patrick



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