I have a make file that includes:
%.dat: %.txt
... PREPROCESSING OF TEXT FILE
tidy -o $*.html $<
... FURTHER PROCESSING
tidy
produces lots of warnings that I can suppress with the flag --show-warnings false
, but despite supressing the warnings, the exit status from tidy
still 1 instead of 0, and so make
fails part way through the recipe. How can I have make
continue in the face of tidy
giving exit status 1 while still allowing make
to fail if any other recipe gives warnings?
I have looked at these two question (Have make fail if unit tests fail and gcc, make: how to disable fail on warning?) but neither seems to deal with this problem.
AFTER EDIT: In Make: how to continue after a command fails?, the question relates to how one gets make
to continue after any non-zero exit status in executing a particular command, whereas in my case, I want an exit status of 2 from tidy
indicating errors, to cause make
to fail, but I want an exit status of 1 from tidy
, indicating warningsto allow
make to continue`.