[PATCH 6/6] Hack up distcheck for publican

Peter Hutterer peter.hutterer at who-t.net
Thu Mar 1 17:33:28 PST 2012

On Thu, Mar 01, 2012 at 10:32:28AM -0500, Gaetan Nadon wrote:
> On 12-02-29 07:40 PM, Peter Hutterer wrote:
> >> +# Copy the en_US source files into en-US destination
> >> > +# This is required for out-of-source-tree build as publican does not allow us
> >> > +# to specify the location of the source code.
> >> > +$(builddir)/en-US/%: $(srcdir)/en_US/% $(builddir)/en-US/Protocol.xml
> >> > +	$(AM_V_GEN)cp -f $< $@
> > fwiw, this will break if the source directory is read-only (bz 798484).
> I am a bit confused. When srcdir=builddir, that directory better be
> writeable, else nothing can be built, publican or otherwise. The
> limitation of publican is that it forces the build to occur in the same
> directory as the source.

yeah, but if the source is read-only and you copy it, the destination is
read-only which is what publican has issues with (some hardcoded value
somewhere caused it to not traverse the directory if it doesn't have write
access). that's the case during make distcheck. That was my only complaint
here, sorry if it wasn't clear.

nevermind though, I'll get Rudi to push out an updated Fedora package and
hope that other distros follow suit.  

as for the option to tell it where the src is, that option has been added,
but I don't think it will feed back into 2.8. Publican 3 is expected in ~3


> The following target incorrectly attempts to build in the srcdir. Note
> that publican is not involved. It is always wrong, but it works when
> srcdir=builddir.
>     docbook-xsl: $(top_srcdir)/protocol/wayland.xml protocol-to-docbook.xsl
>         $(AM_V_GEN)$(XSLTPROC) protocol-to-docbook.xsl
>     $(top_srcdir)/protocol/wayland.xml > *$(srcdir)*/en-US/Protocol.xml
> Let's bypass this target and assume that we don't need this
> Protocol.xml. We would not go very far.
>     nadon at memsize:~/xorg/src/wayland/wayland-master/_build/doc/Wayland$
>     publican build --lang en-US --format html,pdf --config
>     ../../../doc/Wayland/publican.cfg
>     Can't locate required file: en-US/Book_Info.xml at /usr/bin/publican
>     line 556
> Publican cannot build anything because there is no source when
> srcdir!=builddir. One would expect an option on publican to tell it
> where the source is, but no such luck. This is what builddir looks like:
>     nadon at memsize:~/xorg/src/wayland/wayland-master/_build/doc/Wayland$
>     ls -l
>     total 12
>     -rw-rw-r-- 1 nadon nadon 11962 2012-03-01 10:04 Makefile
> That's it. No en-US, nothing. I think that the previous error about
> Protocol.xml combined with the bug report is misleading. The issue is
> not about srcdir being read-only.
> You can reproduce the problem without autotools. Simply cd where en-US
> is not in sight and try to run publican.

More information about the wayland-devel mailing list