On Sun, Dec 15,
2024 at 10:49 AM Marc Rochkind <mrochkind(a)gmail.com> wrote:
> Incidentally, UNIX had a different language-independent macro processor
> called m6. ...
Correction: The version of M6 for UNIX was called
M4. Maybe because it was
only 2/3 as complete?
The Wikipedia article on macroprocessors says that M6 was written in
the 1960s by McIlroy, Morris, and Hall, based on GPM and Trac, written
in Fortran and ported to v2 Unix.
M4 was written in the 1970s by Kernighan and Ritchie in C and is still
around, notably as impenetrable magic in GNU autoconfig and sendmail
config files. It looks a lot like GPM.
Being aware of its reputation, I had some trepidation about using it,
and found its impenetrability to be overstated.
For a few years now I've used it to generate two man pages from a single
source: groff_man(7) and groff_man_style(7).
The only thing I stubbed my toe on is m4's appropriation of common
English words for its command language. A prefix sigil before such
words would have been a better choice. But I got around that, too.