From 3177b525a025ee05cbe101d746b2819231fbbebb Mon Sep 17 00:00:00 2001
From: Philippe PITTOLI
Date: Mon, 27 Apr 2020 02:50:43 +0200
Subject: [PATCH] Static and shared C libs: allow writing "depends[x]=$(ls
src/*.h)".
---
build/sharedlib.zsh | 3 ++-
build/staticlib.zsh | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/build/sharedlib.zsh b/build/sharedlib.zsh
index 0819527..6c93862 100644
--- a/build/sharedlib.zsh
+++ b/build/sharedlib.zsh
@@ -5,7 +5,8 @@ function sharedlib.build {
write -n " ${i%.*}.o"
done
for i in ${depends[@]}; do
- write -n " ${i}"
+ v="$(echo ${i} | tr '\n' ' ' )"
+ write -n " ${v}"
done
write " ${depends[$target]} $(dirdep $target)"
write "\t@echo '$(LD ${target})'"
diff --git a/build/staticlib.zsh b/build/staticlib.zsh
index ec1d1e8..87d8e23 100644
--- a/build/staticlib.zsh
+++ b/build/staticlib.zsh
@@ -5,7 +5,8 @@ function staticlib.build {
write -n " ${i%.c}.o"
done
for i in ${depends[@]}; do
- write -n " ${i}"
+ v="$(echo ${i} | tr '\n' ' ' )"
+ write -n " ${v}"
done
write " ${depends[$target]} $(dirdep $target)"
write "\t@echo '$(LD ${target})'"