bug-make
[Top][All Lists]
Advanced

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

RE: Cygwin make thinks a statement can be neither true nor false....


From: Paul D. Smith
Subject: RE: Cygwin make thinks a statement can be neither true nor false....
Date: Wed, 21 Apr 2004 15:38:46 -0400

%% "Dave Korn" <address@hidden> writes:

  dk> Hmm.  So might there be call for a variant of
  dk> --warn-undefined-variables that only warns about those for which
  dk> $(origin ..) returns undefined?  That way makefiles could supply
  dk> empty-but-overrideable definitions of CFLAGS etc, and everyone's
  dk> happy... I think?

--warn-undefined-variables already only warns about truly undefined
variables.  It won't warn about variables which are defined but empty.

  >> As gross as the syntax is, the make parser has to be equally quirky in
  >> order to handle it :-/.

  dk> Yeh.  I wonder if it would be possible to build a proper parser,
  dk> using lexx/yacc/bison/whatever.  But I guess it would be very hard
  dk> to guarantee that it behaved in the same way as the original one
  dk> for backward compatibility purposes.

The thing about make grammar is that is not in any way LALR.  In fact,
make syntax is really a few completely different "languages" in
different contexts, each with their own unique set of semantic, and even
lexical!, rules.

Writing a parser for it would be interesting, but I suspect it would be
a _LOT_ of work, and would need to use a lot of special features of
whatever LR tool you chose.  Something like PCCTS might be better suited :).

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

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