title: Makefile Grammar
body: <p>Is there anywhere a <em>precise</em> makefile grammar definition? Or at least some common subset since I guess that there are some flavors. Such a grammar that could be used for writing a parser.</p>
  
  <p><a href="http://www.gnu.org/software/make/manual/make.html">GNU Make manual</a> doesn't seem to be that precise. It would require some guessing and trial-and-error to write a parser for makefile based on that document.</p>
  
  <p>I also found a <a href="http://www.antlr3.org/pipermail/antlr-interest/2006-December/018856.html">similar question on ANTLR mail list</a>. But it remained unanswered which kind of suggests the answer...</p>