[packagekit] build error?

Stepan Kasal kasal at ucw.cz
Wed Feb 20 03:08:58 PST 2008


Hello Thomas,
   I'll take the liberty to reply to your comments in the reverse
order:

On Wed, Feb 20, 2008 at 09:43:03AM +0000, Thomas Wood wrote:
> Your other patches look interesting though, but I'm probably not the
> right person to apply them.

That's encouraging, thanks!  I'll finish them today, making them
independent on the questionable gtk-doc patch.

> [...] it's generally accepted that to generate gtk-doc documentation
> you will need to build the library first. I don't really see any merit
> in applying it.

In that case, let's record that common knowledge properly, by adding
the following to the top level Makefile.am:

if ENABLE_GTK_DOC
dist-hook: all
endif

(Note that gtk-doc.make, which is included from docs/api/Makefile.am,
already contains code which prevents running "make dist" without
--enable-gtk-doc.)

> I'm not convinced applying the docs patch makes sense. It's a hack at
> best, [...]

OK, let me explain how I got there.  (I did not thought it's a hack,
but I'm afraid it only proves I have been exposed to Automake too
much. ;-)

"make dist" should create a tarball containing all source files.
It seems natural that this operation can be done without "make all".
Object files and binaries are not required, and if some of the source
files are generated, "make dist" should generate them.  For example,
if pk-marshal.[ch] are to be packed, "make dist" calls
glib-genmarshal to get them.

This thread is about the problem that
   ./autogen.sh && make dist
does not work.  Since "make dist" should only "pack some sources",
it's an unpleasant surprise.

The complicated part is obviously --enable-gtk-doc.  It creates many
files which are generated, yet they should be packed to the tarball.
And they cannot be created by an easy command, like the marshalers,
the process is much more complex.

But make was designed to help with that kind of complexity!  All we
have to do is to describe the dependency "gtk-doc manual depends on
libpackagekit.la".

Unfortunately, the actual implementation of this idea got
complicated and hackish.  If you really want to know the details, see
below.

Otherwise, let me conclude the mail by wishing you a nice day!

Stepan


--------------
The details:

One source of problems is that there are many small makefiles, as
explained in
    Peter Miller, Recursive Mail Considered Harmful,
    http://miller.emu.id.au/pmiller/books/rmch/
Should we have less makefiles, the patch would be less complicated.

To work around this I used is a fairly standard pattern, see for
example
http://www.gnu.org/software/automake/manual/html_node/distcleancheck.html

Another problem is the limitation that you cannot correctly record
dependencies like
	pk-engine.o: pk-marshal.h
	pk-client.o: pk-marshal.h
	etc.
This is discussed in
http://www.gnu.org/software/automake/manual/html_node/Sources.html
and
http://www.gnu.org/software/automake/manual/html_node/Built-sources-example.html





More information about the PackageKit mailing list