Previous: , Up: Other Derived Objects   [Contents][Index]


10.4 Built sources

Occasionally a file which would otherwise be called ‘source’ (e.g. a C ‘.h’ file) is actually derived from some other file. Such files should be listed in the BUILT_SOURCES variable.

BUILT_SOURCES is actually a bit of a misnomer, as any file which must be created early in the build process can be listed in this variable.

A source file listed in BUILT_SOURCES is created before the other all targets are made. However, such a source file is not compiled unless explicitly requested by mentioning it in some other ‘_SOURCES’ variable.

So, for instance, if you had header files which were created by a script run at build time, then you would list these headers in BUILT_SOURCES, to ensure that they would be built before any other compilations (perhaps ones using these headers) were started.