Fix finddeps
This commit is contained in:
parent
e24dfa6e65
commit
387372d302
@ -4,8 +4,8 @@ search() {
|
|||||||
echo "$1"
|
echo "$1"
|
||||||
prefix="$(printf "%s\n" "$1"|sed 's|[^/]*$||')"
|
prefix="$(printf "%s\n" "$1"|sed 's|[^/]*$||')"
|
||||||
deps="$(grep -E '^#include "[^"]*"$' "$1"|cut '-d"' -f2|
|
deps="$(grep -E '^#include "[^"]*"$' "$1"|cut '-d"' -f2|
|
||||||
\sed "s|^|$prefix|;s|\.h\$|.c|"|grep -v "$1")"
|
\sed "s|^|$prefix|;s|\.h\$|.c|"|grep -v "^$1")"
|
||||||
for i in $deps; do search $i; done
|
for i in $deps; do search $i; done
|
||||||
}
|
}
|
||||||
|
|
||||||
search "$1"|sort -u|grep -v "$1"|sed 's|\.c$|.o|'
|
search "$1"|sort -u|grep -v "^$1"|sed 's|\.c$|.o|'
|
||||||
|
Loading…
Reference in New Issue
Block a user