[PATCH 01/10] tools/nolibc: prepare for headers in subdirectories

From: Thomas Weißschuh
Date: Wed Apr 16 2025 - 08:07:34 EST


To support headers in subdirectories (like sys/), their subdirectory needs
to be preserved during installation into the sysroot.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
---
tools/include/nolibc/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/include/nolibc/Makefile b/tools/include/nolibc/Makefile
index f9702877ac21ab5ad30df1740e40e67f477f3824..f562cb53be10efc4e0758b8836cf3ace5b3c151f 100644
--- a/tools/include/nolibc/Makefile
+++ b/tools/include/nolibc/Makefile
@@ -72,7 +72,7 @@ help:
headers:
$(Q)mkdir -p $(OUTPUT)sysroot
$(Q)mkdir -p $(OUTPUT)sysroot/include
- $(Q)cp $(all_files) $(OUTPUT)sysroot/include/
+ $(Q)cp --parents $(all_files) $(OUTPUT)sysroot/include/
$(Q)if [ "$(ARCH)" = "x86" ]; then \
sed -e \
's,^#ifndef _NOLIBC_ARCH_X86_64_H,#if !defined(_NOLIBC_ARCH_X86_64_H) \&\& defined(__x86_64__),' \

--
2.49.0