Targets, Inputs, and Outputs in a Build
A build defines outputs and which source files, settings, or tools must be available to produce them.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 4
- Reading time
- 1 min
In this article4 chapters
Draw a tiny rule
A report file can depend on a template and a data table. Modifying only the table should rebuild the report. Dependency graphs give each such requirement an edge that can guide ordering.
Account for hidden inputs
If a template reads a separate shared header, that header also affects the result. A build that omits it can leave a stale report. Compare reproducible program inputs to identify other dependencies supplied by the environment.[1]
Identify the files that directly determine one output
A packager creates bundle.tgz from a generated report and a manifest. The report itself comes from raw measurements plus a report generator. Writing these dependencies down allows later checks to see why editing the generator should eventually rebuild the bundle. See ordering build steps.
Measurements + generator → report
Report + manifest + packager → bundle.tgz
A changed generator invalidates the report and then its dependent bundle
Distinguish incidental effects from declared output
A log printed during packaging can be useful without defining the produced archive. Conversely, a required index file must be declared if consumers expect it. Test by removing one expected output and rerunning the build.