Instgen is a small tool used to build instances of generic code patterns. It is much like using C++ templates, but it is more general and may be a much more adaequate solution if you have to build your sources with several different compilers. It is discussed in the Package Manager User Guide in the section on templates.