X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=doc%2Fautomake.mk;h=9844d335d493a709da9afab404ae35f96ab4df27;hb=b72595c6b7888b8fe6dd350a5410ff36fe041e06;hp=8c9f660ee347d5bf564852c2a56cf73abc21a678;hpb=2855682105afd9ac6043ceaf39f2c5369acc5de2;p=pspp diff --git a/doc/automake.mk b/doc/automake.mk index 8c9f660ee3..9844d335d4 100644 --- a/doc/automake.mk +++ b/doc/automake.mk @@ -57,9 +57,10 @@ $(srcdir)/doc/tut.texi: $(AM_V_GEN)echo "@set example-dir $(examplesdir)" > $@ -# The SED and AWK filters in this rule, are to work-around some nasty bugs in makeinfo version 4.13, which produces -# broken docbook xml. These workarounds are rather horrible and must be removed asap. -$(srcdir)/doc/pspp.xml: doc/pspp.texi $(doc_pspp_TEXINFOS) +# The SED and AWK filters in this rule, are to work-around some nasty bugs in +# makeinfo version 4.13, which produces broken docbook xml. These workarounds +# are rather horrible and must be removed asap. +$(srcdir)/doc/pspp.xml: doc/pspp.texi $(doc_pspp_TEXINFOS) doc/help-pages-list @$(MKDIR_P) doc $(AM_V_GEN)$(MAKEINFO) $(AM_MAKEINFOFLAGS) --docbook -I $(top_srcdir) \ $(top_srcdir)/doc/pspp.texi -o - \ @@ -78,12 +79,17 @@ $(srcdir)/doc/pspp.xml: doc/pspp.texi $(doc_pspp_TEXINFOS) -e 's/././g' \ -e 's%\(
]*\)>%\1/>%g' \ | $(AWK) '/.*.*<\/para>/{x=sub("",""); print; s=1;next}/<\/table>/{print; if (s==1) print ""; s=0; next}1' \ - > $@ - $(AM_V_at)$(XMLLINT) --output /dev/null $@ || ( $(RM) $@ ; false) + > $@,tmp + $(AM_V_at)$(XMLLINT) --output /dev/null $@,tmp + $(AM_V_at)cat doc/help-pages-list | while read node ; do \ + $(XMLLINT) --xpath "$$node" $@,tmp > /dev/null; \ + if test $$? -ne 0 ; then echo "$$node does not appear in $@" ; exit 1; fi ; \ + done + mv $@,tmp $@ docbookdir = $(docdir) dist_docbook_DATA = doc/pspp.xml - + CLEANFILES += pspp-dev.dvi $(docbook_DATA)