summaryrefslogtreecommitdiffstats
path: root/cpukit/doxy-filter
blob: bc67407d096491ad7fd5ec4e7d5a55e733a9cc80 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
#
# doxygen input filter

# usage: doxy-filter <input-file-name>
# Reads <input-file> and writes to stdout.

file=$1

# Does file contain a doxygen @file directive?
if ! grep -q '@file' $file >/dev/null ; then
# No, add one
echo "/** @file $file */"
cat $file
else
# Yes, adjust path to work around doxygen not being able to
# distinguish file names properly
exec sed -e "s,@file.*$,@file $file," $file
fi