blob: 3842f1f4bfe40f80b04b518f4d352389f8ea2b77 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
#!/bin/sh
#
# Check various man pages for consistency issues related to
# possible changes in the code base
#
tmp=/var/tmp/$$
trap "rm -f $tmp.*; exit 0" 0 1 2 3 15
# man pages that are not in the GNUmakefile will not be included
# in the build
for dir in man?
do
cd $dir
for file in *
do
[ "$file" = GNUmakefile ] && continue
if grep "[ ]$file" GNUmakefile >/dev/null
then
:
else
echo "$dir/$file: not in GNUmakefile"
fi
done
cd ..
done
# completeness of PM_ERR codes in man3/pcpintro.3
#
if [ -x ../src/pmerr/pmerr ]
then
../src/pmerr/pmerr -l
else
echo >&2 "Warning: using installed pmerr not newly built one ..."
pmerr -l
fi \
| sed \
-e 's/^-[0-9]*[ ]*//' \
-e 's/[ ].*//' \
-e '/^$/d' \
| sort >$tmp.codes
awk <man3/pcpintro.3 '
/^.TP/ { want = 1; next }
want == 1 && /^.B PM_ERR/ { print $2 }
{ want = 0 }' \
| sort >$tmp.desc
comm -23 $tmp.codes $tmp.desc >$tmp.tmp
if [ -s $tmp.tmp ]
then
echo "Error codes defined but not documented in man3/pcpintro.3:"
sed -e 's/^/ /' $tmp.tmp
fi
comm -13 $tmp.codes $tmp.desc >$tmp.tmp
if [ -s $tmp.tmp ]
then
echo "Error codes documented in man3/pcpintro.3 but not defined:"
sed -e 's/^/ /' $tmp.tmp
fi
# references to Irix are probably needing to be retired ... other
# than the previously checked exceptions
#
grep -r -i irix man? \
| sed \
-e '/man5\/pmns.5:.*IRIX:[A-Z]/d' \
-e '/man1\/pcpintro.1:.*MacOSX, IRIX, AIX/d' \
-e '/man1\/pmie.1:.*\/SGI_Admin\/books\/PCP_IRIX\//d' \
-e '/man5\/pmns.5:#define IRIX 1/d'
|