DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

(m4.info) Invoking m4

Info Catalog (m4.info) History (m4.info) Preliminaries (m4.info) Bugs
 
 Invoking `m4'
 =============
 
    The format of the `m4' command is:
 
      `m4' [OPTION...] [MACRO-DEFINITIONS...] [INPUT-FILE...]
 
    All options begin with `-', or if long option names are used, with a
 `--'.  A long option name need not be written completely, and
 unambigous prefix is sufficient.  `m4' understands the following
 options:
 
 `--version'
      Print the version number of the program on standard output, then
      immediately exit `m4' without reading any INPUT-FILES.
 
 `--help'
      Print an help summary on standard output, then immediately exit
      `m4' without reading any INPUT-FILES.
 
 `-G'
 `--traditional'
      Suppress all the extensions made in this implementation, compared
      to the System V version.   Compatibility, for a list of
      these.
 
 `-E'
 `--fatal-warnings'
      Stop execution and exit `m4' once the first warning has been
      issued, considering all of them to be fatal.
 
 `-dFLAGS'
 `--debug=FLAGS'
      Set the debug-level according to the flags FLAGS.  The debug-level
      controls the format and amount of information presented by the
      debugging functions.   Debug Levels for more details on the
      format and meaning of FLAGS.
 
 `-lNUM'
 `--arglength=NUM'
      Restrict the size of the output generated by macro tracing.  
      Debug Levels for more details.
 
 `-oFILE'
 `--error-output=FILE'
      Redirect debug and trace output to the named file.  Error messages
      are still printed on the standard error output.   Debug
      Output for more details.
 
 `-IDIR'
 `--include=DIR'
      Make `m4' search DIR for included files that are not found in the
      current working directory.   Search Path for more details.
 
 `-e'
 `--interactive'
      Makes this invocation of `m4' interactive.  This means that all
      output will be unbuffered, and interrupts will be ignored.
 
 `-s'
 `--synclines'
      Generate synchronisation lines, for use by the C preprocessor or
      other similar tools.  This is useful, for example, when `m4' is
      used as a front end to a compiler.  Source file name and line
      number information is conveyed by directives of the form `#line
      LINENUM "FILENAME"', which are inserted as needed into the middle
      of the input.  Such directives mean that the following line
      originated or was expanded from the contents of input file
      FILENAME at line LINENUM.  The `"FILENAME"' part is often omitted
      when the file name did not change from the previous directive.
 
      Synchronisation directives are always given on complete lines per
      themselves.  When a synchronisation discrepancy occurs in the
      middle of an output line, the associated synchronisation directive
      is delayed until the beginning of the next generated line.
 
 `-P'
 `--prefix-builtins'
      Internally modify *all* builtin macro names so they all start with
      the prefix `m4_'.  For example, using this option, one should write
      `m4_define' instead of `define', and `m4___file__' instead of
      `__file__'.
 
 `-WREGEXP'
 `--word-regexp=REGEXP'
      Use an alternative syntax for macro names.  This experimental
      option might not be present on all GNU `m4' implementations.
      ( Changeword.).
 
 `-HN'
 `--hashsize=N'
      Make the internal hash table for symbol lookup be N entries big.
      The number should be prime.  The default is 509 entries.  It
      should not be necessary to increase this value, unless you define
      an excessive number of macros.
 
 `-LN'
 `--nesting-limit=N'
      Artificially limit the nesting of macro calls to N levels,
      stopping program execution if this limit is ever exceeded.  When
      not specified, nesting is limited to 250 levels.
 
      The precise effect of this option might be more correctly
      associated with textual nesting than dynamic recursion.  It has
      been useful when some complex `m4' input was generated by
      mechanical means.  Most users would never need this option.  If
      shown to be obtrusive, this option (which is still experimental)
      might well disappear.
 
      This option does *not* have the ability to break endless
      rescanning loops, while these do not necessarily consume much
      memory or stack space.  Through clever usage of rescanning loops,
      one can request complex, time-consuming computations to `m4' with
      useful results.  Putting limitations in this area would break `m4'
      power.  There are many pathological cases: `define(`a', `a')a' is
      only the simplest example (but  Compatibility.).  Expecting
      GNU `m4' to detect these would be a little like expecting a
      compiler system to detect and diagnose endless loops: it is a
      quite *hard* problem in general, if not undecidable!
 
 `-Q'
 `--quiet'
 `--silent'
      Suppress warnings about missing or superflous arguments in macro
      calls.
 
 `-B'
 `-S'
 `-T'
      These options are present for compatibility with System V `m4', but
      do nothing in this implementation.
 
 `-NN'
 `--diversions=N'
      These options are present only for compatibility with previous
      versions of GNU `m4', and were controlling the number of possible
      diversions which could be used at the same time.  They do nothing,
      because there is no fixed limit anymore.
 
    Macro definitions and deletions can be made on the command line, by
 using the `-D' and `-U' options.  They have the following format:
 
 `-DNAME'
 `-DNAME=VALUE'
 `--define=NAME'
 `--define=NAME=VALUE'
      This enters NAME into the symbol table, before any input files are
      read.  If `=VALUE' is missing, the value is taken to be the empty
      string.  The VALUE can be any string, and the macro can be defined
      to take arguments, just as if it was defined from within the input.
 
 `-UNAME'
 `--undefine=NAME'
      This deletes any predefined meaning NAME might have.  Obviously,
      only predefined macros can be deleted in this way.
 
 `-tNAME'
 `--trace=NAME'
      This enters NAME into the symbol table, as undefined but traced.
      The macro will consequently be traced from the point it is defined.
 
 `-FFILE'
 `--freeze-state FILE'
      Once execution is finished, write out the frozen state on the
      specified FILE ( Frozen files.).
 
 `-RFILE'
 `--reload-state FILE'
      Before execution starts, recover the internal state from the
      specified frozen FILE ( Frozen files.).
 
    The remaining arguments on the command line are taken to be input
 file names.  If no names are present, the standard input is read.  A
 file name of `-' is taken to mean the standard input.
 
    The input files are read in the sequence given.  The standard input
 can only be read once, so the filename `-' should only appear once on
 the command line.
 
Info Catalog (m4.info) History (m4.info) Preliminaries (m4.info) Bugs
automatically generated byinfo2html