docs: a project file can return several configurations

The README's opening and the start of "Writing a project.cpp" say that a
project file returns one configuration or several, and so does the
description in the Flatpak's metainfo. The README has a "Several
configurations" section in "Writing a project.cpp":
CrafterBuildConfigurations with an example, how the configurations it
returns have to be kept, and what a build, test, run, lint, format, -r,
install and bundle do with several. "Dependencies" says how a GitProject
or LocalProject spec picks one of a sibling's configurations, and that a
`#pragma crafter dependency` gets the first; its sentences on the args a
sibling gets, on where to make a spec and on IsTopLevelProject() speak
of a project file's entry point, where they named CrafterBuildProject.
"Dependency notes for agents" says how the dependencyNotes of several
configurations combine, and which runs leave AGENTS.md alone now that a
list of configurations can be refused before a build starts: its
sentence on that said that a build that fails still has the notes, and
named an `install` or `bundle` refused before building as the one
refusal that writes none. The table of ScriptContext says that a
script's `project` is the configuration it is declared on.
This commit is contained in:
Jorijn van der Graaf 2026-11-15 02:16:07 +01:00
commit 53485c160b
Signed by: jorijnvdgraaf
GPG key ID: 2937E59CDCC1BCFB
2 changed files with 66 additions and 11 deletions

View file

@ -12,9 +12,10 @@
<description>
<p>
A build system for C++26 modules. Project descriptions are C++: a
project.cpp constructs a Configuration and returns it, and crafter-build
compiles, loads and executes it. The Flatpak carries its own LLVM, so
every machine builds with the same clang, lld, libc++ and WASI sysroot.
project.cpp constructs a Configuration, or several, and returns them,
and crafter-build compiles, loads and executes it. The Flatpak carries
its own LLVM, so every machine builds with the same clang, lld, libc++
and WASI sysroot.
</p>
</description>
<url type="homepage">https://forgejo.catcrafts.net/Catcrafts/Crafter.Build</url>