Commit 00613691 authored by Niels Möller's avatar Niels Möller
Browse files

Take suffix (for instance .h or .x) as argument.

Rev: src/used_headers:1.3
parent ff8e6303
......@@ -4,12 +4,20 @@
# files. Headers with absolute paths are ignored, leading directories
# of relative file names are deleted.
if [ $# = 0 ]; then
echo Usage: $0 suffix directories...
exit 1
fi
extension=$1
shift
(for d in "$@"; do
if [ -d $d/.deps ]; then
cat $d/.deps/*.P
fi
done) | tr ' ' '\n' \
| grep '\.h$' \
| grep `echo "$extension"'$' |sed 's/\./\\\\./'` \
| sed 's%^.*/\([^/]\+\)$%\1%' \
| sort | uniq
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment