_stderr_msg(text, "error")
exit(1)
}
+function xfail(text) {
+ _stderr_msg(text, "error (ignoring)")
+ exit(77)
+}
function eat_line() {
ret = $0
state = "funcvar"
} else if ($0 == "# @DEAD") {
eclass = "dead"
- exit(10)
+ exit(77)
} else if ($0 == "# @eclass-begin") {
+ # White list old eclasses that haven't been updated so we can block
+ # new ones from being added to the tree.
+ if (eclass == "")
+ xfail("java documentation not supported")
fail("java documentation not supported")
} else if ($0 ~ /^# @/)
warn("Unexpected tag in \"" state "\" state: " $0)
#
END {
if (eclass == "")
- fail("eclass not documented yet (no @ECLASS found)")
+ xfail("eclass not documented yet (no @ECLASS found)")
else if (eclass != "dead")
handle_footer()
}
[[ $# -eq 0 ]] && set -- "${ECLASSDIR}"/*.eclass
+ret=0
for e in "$@" ; do
set -- \
${AWK} \
-f "${FILESDIR}"/eclass-to-manpage.awk \
${e}
if [[ ${AWK} == "gawk" ]] ; then
- "$@" > ${e##*/}.5 || rm -f ${e##*/}.5
+ "$@" > ${e##*/}.5
+ tret=$?
+ if [[ ${tret} -ne 0 ]] ; then
+ rm -f ${e##*/}.5
+ if [[ ${tret} -ne 77 ]] ; then
+ echo "FAIL: ${e}"
+ ret=1
+ fi
+ fi
else
"$@"
fi
done
+exit ${ret}