DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

(m4.info.gz) Top

Info Catalog (dir) Top (m4.info.gz) Preliminaries
 
 GNU M4
 ******
 
 This manual is for GNU M4 (version 1.4.7, 23 September 2006), a package
 containing an implementation of the m4 macro language.
 
    Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 2004, 2005, 2006
 Free Software Foundation, Inc.
 
      Permission is granted to copy, distribute and/or modify this
      document under the terms of the GNU Free Documentation License,
      Version 1.2 or any later version published by the Free Software
      Foundation; with no Invariant Sections, no Front-Cover Texts, and
      no Back-Cover Texts.  A copy of the license is included in the
      section entitled "GNU Free Documentation License."
 
    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 Rene' Seindal, with subsequent
 changes by Franc,ois Pinard and other volunteers on the Internet.  All
 names and email addresses can be found in the files `AUTHORS' and
 `THANKS' from the GNU M4 distribution.
 
    This is release 1.4.7.  It is now considered stable:  future
 releases in the 1.4.x series 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.  In the future,
 `m4' 2.0 will come with a different set of new features that provide
 similar capabilities, but without the inefficiencies, so changeword
 will go away and _you should not count on it_.
 

Menu

 
* Preliminaries               Introduction and preliminaries
* Syntax                      Lexical and syntactic conventions
 
* Macros                      How to invoke macros
* Definitions                 How to define new macros
* Conditionals                Conditionals, loops, and recursion
 
* 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
* Shell commands              Macros for running shell commands
* Miscellaneous               Miscellaneous builtin macros
* Frozen files                Fast loading of frozen state
 
* Compatibility               Compatibility with other versions of `m4'
* Answers                     Correct version of some examples
* Copying This Manual         How to make copies of this manual
* Indices                     Indices of concepts and 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'
* Comments                    Comments in `m4' input
* Other tokens                Other kinds of input tokens
* Input processing            How `m4' copies input to output
 
 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            Special 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 text 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 macro                 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
 
 Macros for running shell commands
 
* Platform macros             Determining the platform
* Syscmd                      Executing simple commands
* Esyscmd                     Reading the output of commands
* Sysval                      Exit status
* Maketemp                    Making temporary files
 
 Miscellaneous builtin macros
 
* Errprint                    Printing error messages
* Location                    Printing current location
* M4exit                      Exiting from `m4'
 
 Fast loading of frozen state
 
* Using frozen files          Using frozen files
* Frozen file format          Frozen file format
 
 Compatibility with other versions of `m4'
 
* Extensions                  Extensions in GNU M4
* Incompatibilities           Facilities in System V m4 not in GNU M4
* Other Incompatibilities     Other incompatibilities
 
 How to make copies of this manual
 
* GNU Free Documentation License  License for copying this manual
 
 Indices of concepts and macros
 
* Concept index               Index for many concepts
* Macro index                 Index for all `m4' macros
 
Info Catalog (dir) Top (m4.info.gz) Preliminaries
automatically generated byinfo2html