[Top][All Lists]

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

[sr #106268] Please implement -M option for M4!

From: anonymous
Subject: [sr #106268] Please implement -M option for M4!
Date: Wed, 20 Feb 2008 21:59:40 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20070530 Fedora/1.0.9-1.fc5 SeaMonkey/1.0.9


                 Summary: Please implement -M option for M4!
                 Project: GNU M4
            Submitted by: None
            Submitted on: Wednesday 02/20/2008 at 21:59 UTC
                Category: None
                Priority: 5 - Normal
                Severity: 1 - Wish
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
        Operating System: None



It would be very nice if GNU M4 supported the -M flag
(and perhaps -MM) like GCC (which has had it for ages).

Over the years I have had several encounters with
Richard M. Stallman of the following form:

DMW: Adding a %include directive to bison would be a nice

RMS: Do this using some external macro pre-processor, such
     as M4.  Don't clutter up bison with something that
     can be performed better using some other tool.

He is right, of course.

However, there is no simple (nor difficult) method for
automatically generating Makefile dependencies for such
hacks.  This is especially true when include file names
encountered by M4 are obtained via macro expansion.
No external shell script or other hack should reasonably
be expected to reproduce all of this internal M4
functionality just to obtain a list of referenced
include files.  Having M4 keep an internal list of
filenames touched, however, should be pretty simple.

If M4 is to be the standard tool to lean on for
implementing ad-hoc "include" functionality, then M4
should definitely support automatic dependency

More recent versions of gcc now have an entire suite
of additional -M style "bells and whistles" options,
and M4 may eventually need to follow suite.  I would
definitely settle for plain old -M initially.  (Of
course -MM would also be nice to have as part of
the initial rollout.)

David Warme


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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