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