m4: Intro

1 
1 1.1 Introduction to 'm4'
1 ========================
1 
1 'm4' is a macro processor, in the sense that it copies its input to the
1 output, expanding macros as it goes.  Macros are either builtin or
1 user-defined, and can take any number of arguments.  Besides just doing
1 macro expansion, 'm4' has builtin functions for including named files,
1 running shell commands, doing integer arithmetic, manipulating text in
1 various ways, performing recursion, etc.... 'm4' can be used either as a
1 front-end to a compiler, or as a macro processor in its own right.
1 
1    The 'm4' macro processor is widely available on all UNIXes, and has
1 been standardized by POSIX. Usually, only a small percentage of users
1 are aware of its existence.  However, those who find it often become
1 committed users.  The popularity of GNU Autoconf, which requires GNU
1 'm4' for _generating_ 'configure' scripts, is an incentive for many to
1 install it, while these people will not themselves program in 'm4'.  GNU
1 'm4' is mostly compatible with the System V, Release 4 version, except
1 for some minor differences.  ⇒Compatibility, for more details.
1 
1    Some people find 'm4' to be fairly addictive.  They first use 'm4'
1 for simple problems, then take bigger and bigger challenges, learning
1 how to write complex sets of 'm4' macros along the way.  Once really
1 addicted, users pursue writing of sophisticated 'm4' applications even
1 to solve simple problems, devoting more time debugging their 'm4'
1 scripts than doing real work.  Beware that 'm4' may be dangerous for the
1 health of compulsive programmers.
1