From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 23 06:18:44 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 C2AA51065670 for ; Wed, 23 Jun 2010 06:18:44 +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 9FC1F8FC0A for ; Wed, 23 Jun 2010 06:18:44 +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 o5N6JRV7046281 for ; Tue, 22 Jun 2010 23:19:27 -0700 (PDT) (envelope-from mahan@mahan.org) Message-ID: <4C21A743.6040306@mahan.org> Date: Tue, 22 Jun 2010 23:18:43 -0700 From: Patrick Mahan User-Agent: Thunderbird 2.0.0.22 (X11/20090605) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: 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: Wed, 23 Jun 2010 06:18:44 -0000 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 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; ./-kernel-toolchain.sh 2>&1 | tee src-kernel: src-kern-tools cd src; ./-kernel64.sh 2>&1 | tee .... 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 -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