[TUHS] M<some number> macros, wasRe: SCCS

G. Branden Robinson g.branden.robinson at gmail.com
Mon Dec 16 06:17:21 AEST 2024


At 2024-12-15T15:09:20-0500, John Levine wrote:
> >On Sun, Dec 15, 2024 at 10:49 AM Marc Rochkind <mrochkind at 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).

https://git.savannah.gnu.org/cgit/groff.git/tree/tmac/groff_man.7.man.in?h=1.23.0

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.

https://git.savannah.gnu.org/cgit/groff.git/tree/tmac/tmac.am?h=1.23.0#n252

Regards,
Branden
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://www.tuhs.org/pipermail/tuhs/attachments/20241215/a7ca73bc/attachment.sig>


More information about the TUHS mailing list