Experimental fix to remove unrequired dependencies.
parent
1d141a64d6
commit
939295f95a
14
build.zsh.in
14
build.zsh.in
|
@ -174,10 +174,20 @@ function duplicated {
|
|||
|
||||
function dirdep {
|
||||
dirname="$(dirname "$1")"
|
||||
local sources=(${(@s/ /)2})
|
||||
local depends=(${(@s/ /)3})
|
||||
|
||||
if [[ "$dirname" != "." ]]; then
|
||||
echo "$dirname"
|
||||
for dep in ${sources[@]} ${depends[@]}; do
|
||||
if [[ "$(dirname $dep)" == "$dirname" ]]; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ "$dirname" == "." ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo "$dirname"
|
||||
}
|
||||
|
||||
for dir in "@SHAREDIR@/build.zsh" ./build; do
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
function ofile.build {
|
||||
local dirname="$(dirname "$target")"
|
||||
write -n "${target}: ${target%.o}.c $(dirdep $target)"
|
||||
write -n "${target}: ${target%.o}.c $(dirdep $target "${target%.o}.c ${sources[$target]}" "${depends[@target]}")"
|
||||
|
||||
sed '/^#include "/!d;s/^#include "//;s/"$//' "${target%.o}.c" | \
|
||||
while read h; do
|
||||
|
|
Loading…
Reference in New Issue