example
Our example is a C project that we want to compile. You will find the sources of the project in sources of the C project.
To build this project, instead of writing a Makefile, we write our own tool, using the yamake crate. You will find the sources of this tool in sources of the demo tool
running the example
cargo run --example project_C -- -s demo_projects -b sandbox
This will:
- Copy source files from
demo_projectstosandbox - Scan C files for
#includedirectives and add dependency edges - Build all targets in parallel where possible
node statuses
After a build, each node has one of these statuses:
- Initial: Not processed yet
- Mounted: Source file copied to sandbox
- MountedFailed: Failed to copy source
- Running: Build in progress
- Build: Successfully built
- BuildFailed: Build failed
- AncestorFailed: Skipped because a dependency failed
error handling
When a build fails:
- The failing node gets
BuildFailedstatus - All dependent nodes get
AncestorFailedstatus make()returnsfalse