m4-patches
[Top][All Lists]
Advanced

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

Proposed / contributed enhancement to GNU m4.


From: David Warme
Subject: Proposed / contributed enhancement to GNU m4.
Date: Mon, 1 Feb 2010 19:35:35 -0500 (GMT-05:00)

I would like to contribute a much-needed enhancement to GNU m4.

It adds the following command line switch:

    --makedep=TARGET

This switch causes GNU m4 to discard all normally generated
macro-expansion output.  Instead, it generates a Makefile dependency
rule on standard output.  This dependency rule has a target (i.e.,
left-hand-side of the rule) as specified by the string TARGET.

This closes a long-standing problem.  In the past I have been rebuffed
by Richard Stallman at least once when asking to add an "include" feature
to tool X.  (X was probably bison.)  His reply was that it made more sense
to use the existing include feature of a tool like m4 rather than to add
additional complexity to each tool X.

Of course his arguments are well-founded, and m4 has indeed been used to
extend include (and other) processing to many tools X.  What has been
lacking, however, is the ability to automatically generate Makefile
dependencies.  Add this capability to m4, and you add the same capability
to all of the tool X's out there.

I have attached a patch file that contains my proposed implementation of
this new feature.

Sincerely,

David Warme

Attachment: m4-makedep.patch.gz
Description: GNU Zip compressed data


reply via email to

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