using /bin/sh in make commands

Roger Collins rogerc at sauron.Columbia.NCR.COM
Thu Oct 19 04:04:11 AEST 1989


In article <21173 at adm.BRL.MIL> Leisner.Henr at 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 at ncrcae.Columbia.NCR.COM
	Uucp:	(ncrsd | ncrlnk)!ncrcae!rogerc



More information about the Comp.unix.wizards mailing list