AutoGen: Generated main

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 7.6 Generating main procedures

When AutoOpts generates the code to parse the command line options, it has the ability to produce any of several types of `main()` procedures. This is done by specifying a global structured value for `main`. The values that it contains are dependent on the value set for the one value it must have: `main-type`.

The recognized values for `main-type` are:

> 7.6.1 guile: main and inner_main procedures |  |
> 7.6.2 shell-process: emit Bourne shell results |  |
> 7.6.3 shell-parser: emit Bourne shell script |  |
> 7.6.4 main: user supplied main procedure |  |
> 7.6.5 include: code emitted from included template |  |
> 7.6.6 invoke: code emitted from AutoGen macro |  |
> 7.6.7 for-each: perform function on each argument |  |
> 7.6.8 each-or-stdin: each argument or on stdin |  |

Here is an example of an `include` variation:

    main = {
      main-type = include;
      tpl       = "main-template.tpl";
    };

This document was generated by Bruce Korb on October 24, 2004 using texi2html