AutoGen is a tool designed to simplify
the creation and maintenance of programs that contain large amounts
of repetitious text. It is especially valuable in programs that have
several blocks of text that must be kept synchronized.
AutoGen will accept either its own definition format, or XML files as definition input, in addition to CGI data (for producing dynamic HTML) and traditional AutoGen definitions.
A common example where this would be useful is in creating and maintaining
the code required for processing program options. Processing options requires
multiple constructs to be maintained in parallel in different places in your
program. Options maintenance needs to be done countless times. So, AutoGen
comes with an add-on package named AutoOpts that simplifies the maintenance and
documentation of program options.
AutoGen is known to work on GNU/Linux, BSD, Apple's OS/X, SVR4-5, HPUX,
SCO OpenServer and Solaris. It is expected that it will work on
any reasonably modern UNIX system with an ANSI-compliant C compiler.
It also runs under WinNT, provided you have CygWin and Guile loaded.
Items of interest:
The announcement for the AutoGen-5.18.6pre15 source distribution describes recent changes. If you choose to download, please drop a note and let me know if you built it and what you used it for.
Thank you. :)
Autogen code uses a tailored character map for determining which
of twenty or so character classes a particular character belongs to.
Just using <ctypes.h> doesn't work so well for that many categories.
So, this generator was developed to create the mappings:
- Here is some general information about code generators and template processors.
A brief quote:
A template processor (also known as a template engine or a template
parser) is software or a software component that is designed to
combine one or more templates with a data model to produce one or more
AutoGen is listed there as "complex". :)
- An interesting article from Computer World
Autoconf configuration macros can be created with an online form. The resulting macro may be added directly to your
aclocal.m4 file, or the AutoGen definitions may be copied aside and the macro regenerated,
should the conftest template be updated. This template is distributed with
AutoGen. NOTE:This form is temporarily out of service. It must
be rebuilt due to server upgrades...
- AutoGen development is hosted on GNU's Savannah Site.
The development page is in projects/autogen. People interested in AutoGen are encouraged to download the CVS sources and provide input.
- Contacting Development:
The full documentation is available online here. But be aware that it is the full documentation, intended as a reference. For just learning to understand AutoGen, the introduction has a purpose section and a simple example. For handy reference, Source Forge has a Google link to help you search the documentation.
A FAQ (Frequently Asked Questions) is available online.
The AutoGen distribution now comes with a ``make package'' rule that will create a native binary package for Solaris and Linux platforms. I'd like to do the same for Debian, Fink and other platforms, too.
AutoOpts 41.1, a semi-automated command line option parser, is included with AutoGen 5.18.6pre15. It automatically generates everything you need for option processing, including man pages and an "invoking" chapter for your texinfo document. There is a separate AutoOpts chapter in the AutoGen doc, complete with a quick-start section. Online, there is a command line option parser Feature Comparison.
Be aware that this chapter is the complete reference doc for AutoOpts, so don't let it overwhelm you.
AutoOpts incorporates a configuration file parser library. This functionality supports
AutoOpts features and is also available separately through configFileLoad(3AutoOpts) and a selected subset of libopts exported functions.
blocksort is a separately downloadable module that you can use as an example of how to integrate the libopts library component of AutoOpts in your project. The above referenced page also gives information on how to simply use AutoOpts.
All that notwithstanding, some folks do not want to mess with dependencies on external libraries. There is now help for you, too: getopt(3C) and getopt_long(3GNU) can parse the AutoOpts options instead of the libopts library. It significantly reduces the set of available features, though.
AutoFSM, a finite state machine generator, is included with AutoGen. It automatically generates easy-to-follow tables and a prototype implementation of a Finite State Machine.
The snprintfv formatting library is included in the AutoGen distribution. It is a replacement for stdio formatting library. It is a fully portable, consistent and extensible formatting library that replaces the standard printf(3) collection of routines.
AutoGen is licensed under the terms of the GPL.
However, whatever it produces is the result of the work of creating
the appropriate template. In other words, the template author is
responsible for choosing the license for the use of that template.
My AutoGen-related projects use the following licenses:
- AutoOpts is licensed under the GPL, with the exception that it is allowed to be linked with non-free programs. See the text for fuller details.
- AutoFSM generates Finite State Machines that are licensed under the BSD license, sans the advertising clause.
- AutoXDR is public domain.
- fixincludes is part of GCC, so it is GPL-ed and donated to the FSF.
- AutoEvents is undecided, but likely BSD.
GCC's FixIncludes was rewritten to make it far, far simpler to specify and maintain system header file edits required by GCC.
AutoXDR is a project for augmenting the rpcgen interface. NFSv4 adopted protocols that cannot be directly supported via rpcgen. They combine RPC calls in order to save network traffic. This is a useful enhancement, but you have to marshall and unmarshall your own arguments. With minor reformatting of the ONC IDL and using this program, it is possible to generate the procedures that will do all of this for you. You can get this here.
The AutoEvents project is underway, making incredibly slow progress. It is a means for automatically maintaining infrastructure for managing the creation, storage, dispatching and displaying of events. For most large projects, it is necessary to coordinate the display and routing of software-initiated messages. This scheme completely alleviates the programmers from the need of making source changes in the event there are changes in central policy. (It happens.)
It also handles much, but not all, of the drudgery of maintaining, managing and triggering these events. (In case you want common methods for enabling and disabling them, and deciding on throttling policies.)
This is not ready yet. It is just coming, eventually.
This program has evolved over a period of several years. During that time, has been a tremendous help in making it more portable, setting up the regression tests and building an entire formatting library because vsprintf was unportable. Thank you!
Also, thanks to for providing code and impetus for implementing GNU-ish usage text for AutoOpts.
Please direct any questions, comments, suggestions or anything else
to the author, .