[scripts] Fix for missing path seperator in errno.h

Make sure to add a path seperator after the root in
codegen.arch_includes.
This commit is contained in:
Justin C. Miller
2024-08-12 19:26:56 -07:00
parent 8f036d9293
commit 372325fab7

View File

@@ -5,10 +5,15 @@ supported_architectures = {
}
def arch_includes(header, root=""):
from pathlib import Path
root = Path(root)
header = Path(header)
prefix = "if"
for arch, define in supported_architectures.items():
path = root / "arch" / arch / header
cog.outl(f"#{prefix} defined({define})")
cog.outl(f"#include <{root}arch/{arch}/{header}>")
cog.outl(f"#include <{path}>")
prefix = "elif"
cog.outl("#else")
cog.outl('#error "Unsupported platform"')