O'Reilly logo

Autotools by John Calcote

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Item 11: Using Generated Source Code

Automake requires that all source files used within a project be statically defined within the project's Makefile.am files, but sometimes the contents of source files need to be generated at build time.

There are two ways to deal with generated sources (more specifically, generated header files) in your projects. The first involves the use of an Automake-provided crutch for developers not interested in the finer points of make. The second involves writing proper dependency rules to allow make to understand the relationships between your source files and your products. I'll cover the crutch first, and then we'll get into the details of proper dependency management in Makefile.am files.

Using the BUILT_SOURCES ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required