using /bin/sh in make commands
Marty
Leisner.Henr at xerox.com
Wed Oct 18 06:23:44 AEST 1989
In making a large system, I stumbled across some interesting behavior I'd
like some help with.
Often people have rules in makefiles of the form:
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.
The Bourne shell has a -e flag to exit immediately on errors.
Unfortunately a line like:
SHELL=/bin/sh -e
doesn't work. (make tries to exec "/bin/sh -e").
Is there a good way to get the functionality I'm looking for without having
to hack up all the makefiles?
This seems to be somewhat unexpected when making systems (i.e. generally a
make should stop when a command fails).
marty
ARPA: leisner.henr at xerox.com
GV: leisner.henr
NS: leisner:wbst139:xerox
UUCP: hplabs!arisia!leisner
More information about the Comp.unix.wizards
mailing list