2007-03-10 19:04:07 +00:00
|
|
|
#!/bin/sh -
|
|
|
|
#
|
|
|
|
# Reconcile the list of public defines with the man pages.
|
|
|
|
|
|
|
|
d=../..
|
|
|
|
docs=$d/docs_src
|
|
|
|
|
|
|
|
[ -f $d/LICENSE ] || {
|
|
|
|
echo 'FAIL: cannot find source distribution directory.'
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
p=$d/dist/pubdef.in
|
|
|
|
|
|
|
|
exitv=0
|
|
|
|
|
|
|
|
cat <<END_OF_TEXT
|
|
|
|
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
|
|
|
Check that pubdef.in has everything listed in m4.links.
|
|
|
|
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
|
|
|
END_OF_TEXT
|
|
|
|
|
|
|
|
f=$docs/m4/m4.links
|
|
|
|
sed -n \
|
|
|
|
-e 's/^\$1, \(DBSQL_[^,]*\).*/\1/p' \
|
|
|
|
-e d < $f |
|
|
|
|
while read name; do
|
|
|
|
if `egrep -w "$name" $p > /dev/null`; then
|
|
|
|
:
|
|
|
|
else
|
|
|
|
echo "$f: $name is missing from $p"
|
|
|
|
exitv=1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
cat <<END_OF_TEXT
|
|
|
|
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
|
|
|
Check that m4.links has everything listed in pubdef.in.
|
|
|
|
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
|
|
|
END_OF_TEXT
|
|
|
|
|
|
|
|
f=$docs/m4/m4.links
|
|
|
|
sed '/^#/d' $p |
|
|
|
|
while read name isdoc isinc; do
|
|
|
|
if `egrep -w "^.1, $name" $f > /dev/null`; then
|
|
|
|
[ "X$isdoc" != "XD" ] && {
|
|
|
|
echo "$name should not appear in $f"
|
|
|
|
exitv=1
|
|
|
|
}
|
|
|
|
else
|
|
|
|
[ "X$isdoc" = "XD" ] && {
|
|
|
|
echo "$name does not appear in $f"
|
|
|
|
exitv=1;
|
|
|
|
}
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
cat <<END_OF_TEXT
|
|
|
|
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
|
|
|
Check that pubdef.in has everything listed in dbsql.in.
|
|
|
|
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
|
|
|
END_OF_TEXT
|
|
|
|
|
2009-09-01 13:53:56 +00:00
|
|
|
f=$d/src/dbsql.in
|
2007-03-10 19:04:07 +00:00
|
|
|
sed -n \
|
|
|
|
-e 's/^#define[ ]*\(DBSQL_[A-Z_0-9][A-Z_0-9]*\).*/\1/p' \
|
|
|
|
-e 's/^[ ]*\(DBSQL_[A-Z_]*\)=[0-9].*/\1/p' \
|
|
|
|
-e d < $f |
|
|
|
|
while read name; do
|
|
|
|
if `egrep -w "$name" $p > /dev/null`; then
|
|
|
|
:
|
|
|
|
else
|
|
|
|
echo "$f: $name is missing from $p"
|
|
|
|
exitv=1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
cat <<END_OF_TEXT
|
|
|
|
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
2009-09-01 13:53:56 +00:00
|
|
|
Check that dbsql.in has everything listed in pubdef.in.
|
2007-03-10 19:04:07 +00:00
|
|
|
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
|
|
|
END_OF_TEXT
|
|
|
|
|
|
|
|
f=$d/src/dbsql.in
|
|
|
|
sed '/^#/d' $p |
|
|
|
|
while read name isdoc isinc; do
|
|
|
|
if `egrep -w "#define[ ]$name|[ ][ ]*$name=[0-9][0-9]*" \
|
|
|
|
$f > /dev/null`; then
|
|
|
|
[ "X$isinc" != "XI" ] && {
|
|
|
|
echo "$name should not appear in $f"
|
|
|
|
exitv=1
|
|
|
|
}
|
|
|
|
else
|
|
|
|
[ "X$isinc" = "XI" ] && {
|
|
|
|
echo "$name does not appear in $f"
|
|
|
|
exitv=1
|
|
|
|
}
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
exit $exitv
|