Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!gatech!hubcap!ncrcae!sauron!rogerc From: rogerc@sauron.Columbia.NCR.COM (Roger Collins) Newsgroups: comp.unix.wizards Subject: Re: using /bin/sh in make commands Message-ID: <1761@sauron.Columbia.NCR.COM> Date: 18 Oct 89 18:04:11 GMT References: <21173@adm.BRL.MIL> Reply-To: rogerc@sauron.UUCP (Roger Collins) Organization: E&M-Columbia, NCR Corp, W Columbia, SC Lines: 27 In article <21173@adm.BRL.MIL> Leisner.Henr@xerox.com (Marty) writes: > > DIRS=lib src > > foo: > for i in $(DIRS); do \ > (cd $$i; $(MAKE) foo); \ > done > > It seems if one of the sub-makes fails, the shell loop continues. Try this instead: ---------------------------------------- DIRS=lib src foo: $(DIRS) $(DIRS):: cd $@; $(MAKE) foo ---------------------------------------- -- Roger Collins NCR - Engineering & Manufacturing Columbia Domain: rogerc@ncrcae.Columbia.NCR.COM Uucp: (ncrsd | ncrlnk)!ncrcae!rogerc