I have a makefile, with a test suite target, like so:
rcheck:
foo
This shows the output from the foo command on stdout, and returns an exit code from foo which is handled by make as normal.
I want to add something to this target, to parse foo's output without affecting the existing behaviour - that is:
foo's stdout/stderr should be displayed on stdout/stderr, as before- the final outcome of the rcheck target, as far as Make is concerned, is whatever
foo's exit code was - stdout from
fooshould be passed to a second command,bar, somehow.bar's exit code doesn't matter, andbarshould not output anything to stdout or stderr in addition to 1. above (unless the solution meansbarhandles 1. itself)
What is the neatest solution here?