Gary wrote:
At the moment my makefile includes commands to run "php -l" against each
php file. This command basically performs a syntax check on the given
file.
To be honest, because I am running this via make on dozens of files, I
find all the "No syntax errors..." messages unnecessary. In fact they're
a downright pain because they obscure any problems that might be
detected.

So what I would like is to only get output when it is an error. Is that
possible using only the makefile? I don't really want to run the lint
check via a shell script if I can avoid it. Can I capture the output,
and then output that text if the return code is -1, maybe?

Initial hint: How would you filter such an output if you would call it using a shell script?

I would propose:
php -l | grep "No syntax errors" -v

This returns you everything on stdout except those lines that contain "No syntax errors" Filtering done using a shell call should be faster than a parsing and filtering done by make. (Please correct me if this does not apply!!)

Best regards,

Erik



_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to