pub fn derive_output_path(source_path: &Path, target: &TargetProfile) -> PathBufExpand description
Derive the output path for a generated file from its source .bock path.
Per spec §20.6.1, a source file at src/<path>.bock produces output at
<path>.<ext> (relative to the target build directory). Sources outside
src/ keep their full path. The returned PathBuf is always relative —
callers prepend build/<target>/.
src/main.bock→main.<ext>src/utils/parse.bock→utils/parse.<ext>main.bock→main.<ext>(nosrc/prefix to strip)
Leading ./ and any other curdir components are normalized away before
stripping, so the source path can be supplied either bare or with a
./ prefix as produced by directory traversal.