(m4.info)Top


Next: Preliminaries Prev: (dir) Up: (dir)

GNU `m4'
********

   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).  `m4' also has builtin functions for including files, running
shell commands, doing arithmetic, etc.  Autoconf needs GNU `m4' for
generating `configure' scripts, but not for running them.

   GNU `m4' was originally written by Ren'e Seindal, with subsequent
changes by Franc,ois Pinard and other volunteers on the Internet.  All
names and email addresses can be found in the file `THANKS' from the
GNU `m4' distribution.

   This is release 1.4.  It is now to be considered stable, future
releases are only meant to fix bugs, increase speed, or improve
documentation.  However...

   An experimental feature, which would improve `m4' usefulness, allows
for changing the syntax for what is a "word" in `m4'.  You should use:
     ./configure --enable-changeword

if you want this feature compiled in.  The current implementation slows
down `m4' considerably and is hardly acceptable.  So, it might go away,
do not count on it yet.

* Preliminaries
Introduction and preliminaries
* Syntax
Lexical and syntactic conventions
* Macros
How to invoke macros
* Definitions
How to define new macros
* Conditionals
Conditionals and loops
* Debugging
How to debug macros and input
* Input Control
Input control
* File Inclusion
File inclusion
* Diversions
Diverting and undiverting output
* Text handling
Macros for text handling
* Arithmetic
Macros for doing arithmetic
* UNIX commands
Macros for running UNIX commands
* Miscellaneous
Miscellaneous builtin macros
* Frozen files
Fast loading of frozen states
* Compatibility
Compatibility with other versions of m4
* Concept index
Index for many concepts
* Macro index
Index for all m4 macros
 -- The Detailed Node Listing --

Introduction and preliminaries

* Intro
Introduction to `m4'
* History
Historical references
* Invoking m4
Invoking `m4'
* Bugs
Problems and bugs
* Manual
Using this manual
Lexical and syntactic conventions

* Names
Macro names
* Quoted strings
Quoting input to m4
* Other tokens
Other kinds of input tokens
* Comments
Comments in m4 input
How to invoke macros

* Invocation
Macro invocation
* Inhibiting Invocation
Preventing macro invocation
* Macro Arguments
Macro arguments
* Quoting Arguments
On Quoting Arguments to macros
* Macro expansion
Expanding macros
How to define new macros

* Define
Defining a new macro
* Arguments
Arguments to macros
* Pseudo Arguments
Pseudo arguments to macros
* Undefine
Deleting a macro
* Defn
Renaming macros
* Pushdef
Temporarily redefining macros
* Indir
Indirect call of macros
* Builtin
Indirect call of builtins
Conditionals, loops and recursion

* Ifdef
Testing if a macro is defined
* Ifelse
If-else construct, or multibranch
* Loops
Loops and recursion in m4
How to debug macros and input

* Dumpdef
Displaying macro definitions
* Trace
Tracing macro calls
* Debug Levels
Controlling debugging output
* Debug Output
Saving debugging output
Input control

* Dnl
Deleting whitespace in input
* Changequote
Changing the quote characters
* Changecom
Changing the comment delimiters
* Changeword
Changing the lexical structure of words
* M4wrap
Saving input until end of input
File inclusion

* Include
Including named files
* Search Path
Searching for include files
Diverting and undiverting output

* Divert
Diverting output
* Undivert
Undiverting output
* Divnum
Diversion numbers
* Cleardiv
Discarding diverted text
Macros for text handling

* Len
Calculating length of strings
* Index
Searching for substrings
* Regexp
Searching for regular expressions
* Substr
Extracting substrings
* Translit
Translating characters
* Patsubst
Substituting text by regular expression
* Format
Formatting strings (printf-like)
Macros for doing arithmetic

* Incr
Decrement and increment operators
* Eval
Evaluating integer expressions
Running UNIX commands

* Syscmd
Executing simple commands
* Esyscmd
Reading the output of commands
* Sysval
Exit codes
* Maketemp
Making names for temporary files
Miscellaneous builtin macros

* Errprint
Printing error messages
* M4exit
Exiting from m4
Compatibility with other versions of `m4'

* Extensions
Extensions in GNU m4
* Incompatibilities
Facilities in System V m4 not in GNU m4
* Other Incompat
Other incompatibilities

automatically generated by info2www