m4: History

1 
1 1.2 Historical references
1 =========================
1 
1 Macro languages were invented early in the history of computing.  In the
1 1950s Alan Perlis suggested that the macro language be independent of
1 the language being processed.  Techniques such as conditional and
1 recursive macros, and using macros to define other macros, were
1 described by Doug McIlroy of Bell Labs in "Macro Instruction Extensions
1 of Compiler Languages", _Communications of the ACM_ 3, 4 (1960), 214-20,
1 <http://dx.doi.org/10.1145/367177.367223>.
1 
1    An important precursor of 'm4' was GPM; see C. Strachey, "A general
1 purpose macrogenerator", _Computer Journal_ 8, 3 (1965), 225-41,
1 <http://dx.doi.org/10.1093/comjnl/8.3.225>.  GPM is also succinctly
1 described in David Gries's book _Compiler Construction for Digital
1 Computers_, Wiley (1971).  Strachey was a brilliant programmer: GPM fit
1 into 250 machine instructions!
1 
1    Inspired by GPM while visiting Strachey's Lab in 1968, McIlroy wrote
1 a model preprocessor in that fit into a page of Snobol 3 code, and
1 McIlroy and Robert Morris developed a series of further models at Bell
1 Labs.  Andrew D. Hall followed up with M6, a general purpose macro
1 processor used to port the Fortran source code of the Altran computer
1 algebra system; see Hall's "The M6 Macro Processor", Computing Science
1 Technical Report #2, Bell Labs (1972),
1 <http://cm.bell-labs.com/cm/cs/cstr/2.pdf>.  M6's source code consisted
1 of about 600 Fortran statements.  Its name was the first of the 'm4'
1 line.
1 
1    The Brian Kernighan and P.J. Plauger book _Software Tools_,
1 Addison-Wesley (1976), describes and implements a Unix macro-processor
1 language, which inspired Dennis Ritchie to write 'm3', a macro processor
1 for the AP-3 minicomputer.
1 
1    Kernighan and Ritchie then joined forces to develop the original
1 'm4', described in "The M4 Macro Processor", Bell Laboratories (1977),
1 <http://wolfram.schneider.org/bsd/7thEdManVol2/m4/m4.pdf>.  It had only
1 21 builtin macros.
1 
1    While 'GPM' was more _pure_, 'm4' is meant to deal with the true
1 intricacies of real life: macros can be recognized without being
1 pre-announced, skipping whitespace or end-of-lines is easier, more
1 constructs are builtin instead of derived, etc.
1 
1    Originally, the Kernighan and Plauger macro-processor, and then 'm3',
1 formed the engine for the Rational FORTRAN preprocessor, that is, the
1 'Ratfor' equivalent of 'cpp'.  Later, 'm4' was used as a front-end for
1 'Ratfor', 'C' and 'Cobol'.
1 
1    Rene' Seindal released his implementation of 'm4', GNU 'm4', in 1990,
1 with the aim of removing the artificial limitations in many of the
1 traditional 'm4' implementations, such as maximum line length, macro
1 size, or number of macros.
1 
1    The late Professor A. Dain Samples described and implemented a
1 further evolution in the form of 'M5': "User's Guide to the M5 Macro
1 Language: 2nd edition", Electronic Announcement on comp.compilers
1 newsgroup (1992).
1 
1    Franc,ois Pinard took over maintenance of GNU 'm4' in 1992, until
1 1994 when he released GNU 'm4' 1.4, which was the stable release for 10
1 years.  It was at this time that GNU Autoconf decided to require GNU
1 'm4' as its underlying engine, since all other implementations of 'm4'
1 had too many limitations.
1 
1    More recently, in 2004, Paul Eggert released 1.4.1 and 1.4.2 which
1 addressed some long standing bugs in the venerable 1.4 release.  Then in
1 2005, Gary V. Vaughan collected together the many patches to GNU 'm4'
1 1.4 that were floating around the net and released 1.4.3 and 1.4.4.  And
1 in 2006, Eric Blake joined the team and prepared patches for the release
1 of 1.4.5, with subsequent releases through intervening years, as recent
1 as 1.4.18 in 2016.
1 
1    Meanwhile, development has continued on new features for 'm4', such
1 as dynamic module loading and additional builtins.  When complete, GNU
1 'm4' 2.0 will start a new series of releases.
1