From 3c46c8af86c36f49fb0345dfd5aeee902b6251a3 Mon Sep 17 00:00:00 2001 From: "Brett T. Warden" Date: Mon, 30 Oct 2023 09:32:37 -0700 Subject: [PATCH] Ensure we create deeper directories for libs Also use "update" mode for cp instead of "no clobber" to reduce error messages. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b054ce6..caaed34 100644 --- a/Makefile +++ b/Makefile @@ -27,11 +27,12 @@ clr-init.cpio: mkdir -p initramfs/usr/lib64/glibc-hwcaps/x86-64-v4;\ fi for file in $(BINFILES); do \ + mkdir -p initramfs/$$(dirname "$${file}"); \ cp -fL $$file initramfs/$$file || exit 1;\ if file $$file | grep -q ELF; then \ for lddfile in $$(ldd $$file | awk '{print $$3}' | grep "^/"); do \ file_path=$$(dirname $$lddfile); \ - cp -Ln $$lddfile initramfs/$$file_path/; \ + cp -Lu $$lddfile initramfs/$$file_path/; \ done \ fi \ done