Re: run xmllint during build (was Re: need xmllint on borka) - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: run xmllint during build (was Re: need xmllint on borka)
Date
Msg-id alpine.DEB.2.10.1408211018330.21654@sto
Whole thread Raw
In response to run xmllint during build (was Re: need xmllint on borka)  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: run xmllint during build (was Re: need xmllint on borka)
Re: run xmllint during build (was Re: need xmllint on borka)
Re: run xmllint during build (was Re: need xmllint on borka)
List pgsql-hackers
Hello Peter,

>> Agreed.  I have committed the SGML changes that make things valid now,
>> but I will postpone the xmllint addition until the 9.5 branch, complete
>> with more documentation.
>
> Per the above announcement, here is an updated patch, also with more
> documentation and explanations.
>
> It would especially be valuable if someone with a different-than-mine OS
> would verify whether they can install xmllint according to the
> documentation, or update the documentation if not.

Tested on Ubuntu trusty.

Patched applies with some minor warning on current head, and works, that 
is "xmllint" is run for some of the targets (epub, man).

However, it seems that it is not run for target "html", nor for pdf/ps 
targets. I'm wondering whether it is an oversight or if there is a reason 
for that. Maybe the intention is that an explicit "htmlhelp" is expected 
to do the checking, but then why force it for man and epub? It seems to me 
that it is not consistent.


Also, a general comment, which is independent of this patch: I found the 
documentation build especially not resilient, with a lack of clear error 
messages when something is broken. Basically, if configure does not found 
something for the doc (openjade, osx, xmllint, ...) it does not complain. 
That is fine with me, people would not always want to build the doc anyway 
as it is available online. However, the Makefile in doc/src/sgml overrides 
the not found commands (ifndef JADE JADE=..., etc), and proceed to 
unhelpful and unclear errors later on. ISTM that it may be more helful to 
do:
  ifndef JADE  #error "no jade found on your system, cannot generate the documention"  endif

Rather than overriding with "JADE=jade" if jade was not there when 
configuring.

This xmllint addition is done in the same spirit. I would suggest at the 
minimum to check that xmllint is available before running it, or to ignore 
the call if not available, something like:
    type -p $(XMLLINT) || { echo error no $(XMLLINT)... ; exit 1 ; }    $(XMLLINT) ...

or
    -type -p $(XMLLINT) && $(XMLLINT) ...

And I would prefer that a straightforward error is generated when
commands or styles are not found, in general.

Also, a detail, the Makefile style is not homogeneous:
    ifndef XSLTPROC    XSLTPROC = xsltproc    endif
    DBTOEPUB ?= dbtoepub

Why not XSLTPROC ?= xsltproc and the like?

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Christoph Berg
Date:
Subject: Re: [TODO] Process pg_hba.conf keywords as case-insensitive
Next
From: Sawada Masahiko
Date:
Subject: Re: pg_receivexlog --status-interval add fsync feedback