failure

Henry Cejtin henry@sourcelight.com
Tue, 2 Oct 2001 20:06:34 -0500


In addition to the doc problem (it didn't get that far) it failed compiling
mlyacc because cmcat was not found.
MUCH worse: the makefile entry to make $(NAME).cm succeeded.  You cannot use
things like
	$(NAME).cm: xxx yyy
		(					\
			cmd;				\
			cmd;				\
		)
because if the first `cmd' fails, the second one will still run and the exit
status (which make will see) will be from the second one.  (Also the semicolon
is a separator, not a terminator in the shell so I would eliminate the last one,
but that doesn't matter.)
You need to change ALL of these in ALL the makefile rules to use &&.
I.e., the rule should be
	$(NAME).cm: xxx yyy
		(					\
			cmd &&				\
			cmd				\
		)
then if the first command fails the second one won't be tried and make will
get that failure as the exit status.