[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Summarising compiler output?

From: Erik Rull
Subject: Re: Summarising compiler output?
Date: Mon, 02 Aug 2010 18:08:40 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20100701 Lightning/1.0b1 SeaMonkey/2.0.6

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
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

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,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]