fixed filename bug

This commit is contained in:
Noah Swerhun 2024-03-04 11:09:57 -06:00
parent 676c1d91a8
commit c7e5ba1c55

View file

@ -92,9 +92,9 @@ build $builddir/{name}/dep: mkdir
for elem in a {
match elem {
Value::String(s) => {
let s = s.replace("/", "-");
let obj_name = format!("$builddir/{name}/obj/{s}.o");
let dep_name = format!("$builddir/{name}/dep/{s}.o.d");
let new_file = s.replace("/", "-");
let obj_name = format!("$builddir/{name}/obj/{new_file}.o");
let dep_name = format!("$builddir/{name}/dep/{new_file}.o.d");
ret.push_str(&format!(
"build {obj_name}: cc_{name} {s} | build.ninja || $builddir/{name}/obj $builddir/{name}/dep\n dep = {dep_name}\n"
));