GPP is a general-purpose preprocessor with customizable syntax, suitable for a wide range of preprocessing tasks. Its independence from any one programming language makes it much more versatile than the C preprocessor (cpp), while its syntax is lighter and more flexible than that of GNU m4. There are built-in macros for use with C/C++, LaTeX, HTML, XHTML, and Prolog files.
GPP is Free Software. It is distributed under the terms of the GNU Lesser General Public Licence.
The latest stable version of GPP is 2.27, released on 2020-07-27. A list of changes from previous versions can be found in the change log.
You can download portable source packages for the current and previous releases on GitHub or nothingisreal.com. These include a portable installation script and installation instructions.
Alternatively, you can browse, download, or clone the development version on GitHub, though note that if you do this you will need to manually set up the build system using the GNU Autotools rather than using the end-user installation instructions mentioned above.
Ports and binary packages
Binary packages are available for several systems, including:
- Debian GNU/Linux
- openSUSE and SUSE Linux Enterprise
- Fedora (via its package management tool, DNF)
Note that these packages are produced and hosted by third parties. The GPP authors take no responsibility for them.
You can browse through the online HTML documentation.
Note that the documentation itself is generated by GPP using an input
file with macros that can automatically produce HTML, LaTeX, or troff
(man page) output. Studying this file (
gpp.pp in the source) should
prove instructive, and manually running it through GPP can serve as a
basic test of the program's functionality.
To refer to GPP in a publication, please use the following citation:
Tristan Miller and Denis Auroux. GPP, the generic preprocessor. Journal of Open Source Software, 5(51), July 2020. ISSN 2475-9066. DOI: 10.21105/joss.02400.
GPP was originally written by Denis Auroux. Since version 2.12 it has been maintained by Tristan Miller.