help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master makefile that calls make in various subdirectories


From: Kris Thielemans
Subject: master makefile that calls make in various subdirectories
Date: Thu, 14 Jun 2001 14:19:46 +0100

Hi,

I'd like to have a Makefile such that when I do 'make all [cmds]', it does
this in a bunch of subdirectories. At the moment I have simplistically

SUBDIRECTORIES= subdir1 subdir2  ... subdirn

all:
        for subdir in $(SUBDIRECTORIES); do   \
                        (cd $$subdir; $(MAKE) all); \
        done;


This works, but has the problem that when one of the makes in a subdirectory
fails, it is not passed on to the 'master make', such that make just
continues with the rest of the subdirectories. This is contrary to the
philosophy of make (it's a bit like using 'make -k', but only for the master
make, not for the submakes), and dangerous because the user might not have
seen the mistake in the first place.

How to do better? Thanks!

Kris Thielemans
Imaging Research Solutions Ltd
Cyclotron Building
Hammersmith Hospital
Du Cane Road
London W12 ONN, United Kingdom

Phone on :   +44 (020)8383 3731
FAX on :     +44 (020)8383 2029

web site address:
http://www.irsl.org/~kris




reply via email to

[Prev in Thread] Current Thread [Next in Thread]