Diagnosing Problems

One of the most significant stumbling blocks that people run into at this point is not so much a lack of understanding of how these macros work but a lack of attention to detail. There are several places where things can go wrong when writing even a simple macro like this. For example, you might have any of the following problems:

  • Space between a macro name and the opening parenthesis

  • Unbalanced brackets or parentheses

  • The wrong number of parameters

  • A misspelled macro name

  • Incorrectly quoted arguments to a macro

  • A missing comma in a macro's parameter list

M4 is rather unforgiving of such mistakes. Worse, its error messages can be even more cryptic than those of make.[140] If you get strange errors and you think your macro should be ...

Get Autotools now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.