feature. See also
. The project being documented here (as the example) is the Zig library itself.
Maker.confPathDepToCachePath
fn confPathDepToCachePath(graph: *const Graph, c: *const Configuration, path_dep: Configuration.PathDep) Path
File
Code
fn confPathDepToCachePath(graph: *const Graph, c: *const Configuration, path_dep: Configuration.PathDep) Path {
const sub_path = path_dep.sub.slice(c);
return switch (path_dep.flags.base) {
.cwd => .{
.root_dir = .cwd(),
.sub_path = sub_path,
},
.local_cache => .{
.root_dir = graph.local_cache_root,
.sub_path = sub_path,
},
.global_cache => .{
.root_dir = graph.global_cache_root,
.sub_path = sub_path,
},
.build_root => .{
.root_dir = switch (path_dep.pkg.unwrap().?) {
.root => graph.build_root_directory,
_ => @panic("TODO"),
},
.sub_path = sub_path,
},
.zig_lib => .{
.root_dir = graph.zig_lib_directory,
.sub_path = sub_path,
},
.zig_exe => @panic("TODO"),
.install_prefix => @panic("TODO"),
.install_lib => @panic("TODO"),
.install_bin => @panic("TODO"),
.install_include => @panic("TODO"),
};
}