From 372325fab7b6f252f0b767b2dc44ac3e224b7b50 Mon Sep 17 00:00:00 2001 From: "Justin C. Miller" Date: Mon, 12 Aug 2024 19:26:56 -0700 Subject: [PATCH] [scripts] Fix for missing path seperator in errno.h Make sure to add a path seperator after the root in codegen.arch_includes. --- scripts/codegen/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/codegen/__init__.py b/scripts/codegen/__init__.py index 820392b..4bc6c07 100644 --- a/scripts/codegen/__init__.py +++ b/scripts/codegen/__init__.py @@ -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"')