helpGNU M4 - Support: sr #106268, Please implement -M option for M4!

 
 

sr #106268: Please implement -M option for M4!

Submitted by:  None
Submitted on:  Wed 20 Feb 2008 09:59:38 PM UTC  
 
Category: NonePriority: 5 - Normal
Severity: 1 - WishStatus: Confirmed
Privacy: PublicAssigned to: None
Originator Email: -unavailable-Open/Closed: Open
Operating System: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 21 Feb 2008 05:34:01 PM UTC, comment #2:

Thanks Eric,

I specified -M more for the ability to refer directly
to GCC's interface definition than anything else. Call
it --supercalifragilisticexpialidocious if you must...

The best news for me to take away from this is that
the M4 developers consider this to be A Good Thing (tm),
and would be willing to include it in a future release
if we were to implement it.

I will check with my supervisor to see whether or not
such a "volunteer" exists within our organization...

David Warme

Anonymous
Thu 21 Feb 2008 02:07:33 AM UTC, comment #1:

Hmm. git head already provides -M to mean --module-directory, which has nothing to do with dependency tracking, so we would have to use a different letter (or if Gary's idea of simplifying modules pans out, free it up for a better use). However, the idea of dependency tracking is reasonable, and in fact is already in the TODO from several years ago:

+ Make m4 show include dependencies like gcc so Makefile targets are
updated when their (included) input files are updated (Erick B).

All we need is a volunteer with enough time and desire to implement it.

Eric Blake <ericb>
Project Administrator
Wed 20 Feb 2008 09:59:38 PM UTC, original submission:

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
feature.

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
generation.

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

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by ericb (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 21 Feb 2008 02:07:33 AM UTCericbStatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup