It would be nice if there were a reliable way to grep for errors in the output of make. But this is unachievable today because every tool that make runs has its own style of reporting errors and warnings. There should be a standard way. I propose a new library function: #define TROUBLE_ERROR "error: " #define TROUBLE_WARNING "warning: " extern char* trouble(char* trouble, char* message); If a TROUBLE_STANDARD environment variable is present, the returned string is prepended with the first argument. Otherwise, the returned string is the same as the given message. If the TROUBLE_PREFIXES environment variable is present, it can replace default prefixes as desired. For example: export TROUBLE_PREFIXES='~error:~***ERROR: ~warning: ~*WARNING: ~' where ~ can be any character a la sed replacement. All gnu commands should be updated to use the new mechanism. In case legacy software is going to look at the output, and the software requires the exact previous error syntax, full backward compatibility is retained by not defining the TROUBLE_STANDARD environment variable.
There is fmtmsg and nobody uses it.