GNU M4 - The GNU Macro Processor
Introduction
GNU M4 is an implementation of the traditional UNIX macro processor. It is mostly SVR4 compatible although it has some extensions (for example, handling more than 9 positional parameters to macros). GNU M4 is a macro processor in the sense that it copies its input to the output expanding macros as it goes. Macros are either builtin or user-defined and can take any number of arguments. Besides just doing macro expansion GNU M4 has builtin functions for including named files, running UNIX commands, doing integer arithmetic, manipulating text in various ways, recursion etc. GNU M4 can be used either as a front-end to a compiler or as a macro processor in its own right.
GNU M4 is being actively developed, and version 2.0 will have many new features, such as better input control, multiple precision arithmetic and loadable modules. Information about the future of GNU M4 is at
http://savannah.gnu.org/projects/m4/.
GNU M4 is maintained by Gary V. Vaughan.
Availability
|
Current Release Versions |
||
|
Stable |
2006-11-21 |
|
The latest official stable release is available via ftp from your nearest GNU mirror. Download instructions and a list of ftp mirror sites are
here.
Anonymous CVS
The master copy of GNU M4 is kept on GnuSavannah, where the latest M4 development sources are available via anonymous CVS.
Use the following commands to check them out:
$ export CVS_RSH=ssh $ cvs -z3 -d :ext:anoncvs@savannah.gnu.org:/cvsroot/m4 co m4
Once you have the tree checked out, you can keep it up to date by using cvs update. There are two interesting branches right now, which you can check out by using the -r <tag> switch to cvs co or cvs update:
|
Tag Details |
|
|
HEAD |
The main development trunk, working towards release 2.0 |
|
branch_1-4 |
The 1.4 release branch. Patch releases for 1.4.x come from here |
You can
browse the cvs archive live from the subversions repository with the help of viewcvs.
If you want to mirror the entire M4 CVS repository, the FSF provides an anonymous rsync server at rsync://subversions.gnu.org/cvs/. Please contact
cvs-hackers@gnu.org if you do publicly mirror the repository.
The CVS version of GNU M4 often depends on some yet to be released versions of GnuAutoconf, GnuAutomake and GnuLibtool. Before using CVS M4, you ought to have installed recent versions of those tools, then run ./bootstrap in the newly-created m4 directory in order to regenerate the configure script and Makefile.in files.
Resources
I have been finding it increasingly difficult to track bugs, features and todo items on the mailing lists, so I'm starting to record them here instead:
That done, accepted items from above are categorised by milestone here:
Online Documentation
Online Manual is available at
http://www.gnu.org/software/m4/manual
Mailing Lists
M4 has four mailing lists hosted at gnu.org. Archives of these lists are stored at
http://mail.gnu.org/pipermail/. If you don't spam, and you want to ensure that your comments, bug reports or feature requests are not lost in the list archives, then consider adding them directly to this site instead of using the lists:
<m4-discuss AT gnu DOT org> is for discussion of m4 development, porting to new platforms, ideas for the future, general libtool usage or problems. New alpha and stable releases are announced here. You can subscribe or unsubscribe on the web with
mailman, or by sending an email to <libtool-request AT gnu DOT org> with subscribe as the subject line. Volume is typically low. <m4-patches AT gnu DOT org> is where the patches to the m4 repository are posted for peer review before being committed to CVS. You can subscribe or unsubscribe on the web with
mailman, or by sending an email to <m4-patches-request AT gnu DOT org> with subscribe as the subject line. Volume is typically low, though individual messages can be quite large. <m4-commit AT gnu DOT org> is where summaries of changes commited to the CVS repository are automatically posted. If you wish to see these changes as they happen, you can subscribe or unsubscribe on the web with
mailman, or by sending an email to <m4-commit-request AT gnu DOT org> with subscribe as the subject line. Volume is sporadic, but typically low. There is also a special list for reporting bugs, <m4-bugs AT gnu DOT org>, to enable the developers to track submitted bug reports. You can subscribe or unsubscribe on the web with
mailman, or by sending an email to <m4-bugs-request AT gnu DOT org> with subscribe as the subject line. If you think you have found a bug in M4, then you should, in the first instance send as complete a report as possible to this list, including the version of M4 that you are using. Ideally, you should include the text you get by running config.guess, the text you see when you run configure, and if you can, a patch made with diff -u5 which fixes the problem. If you can send a small script, modelled after the scripts in the tests directory of the distribution which fails with the unpatched distribution, but passes with your patch applied we can add the test to the distribution to make sure the bug doesn't reappear.
Azazil Wiki