Re: Makefile constructs



On Sun, Jan 03, 2010 at 09:49:05PM +0200, Stefan Kost wrote:
> I'd like to fix
> https://bugzilla.gnome.org/show_bug.cgi?id=543489
>   make -j for gtk-doc

The patch there is suspicios.  Rules like this

-sgml.stamp: sgml-build.stamp
+sgml.stamp $(DOC_MAIN_SGML_FILE): sgml-build.stamp

normally cause make to run the commands twice: once when it wants
$(DOC_MAIN_SGML_FILE) and once when it wants sgml-build.stamp.  That is,
the commands will be probably run any time $(DOC_MAIN_SGML_FILE) is
older than the prerequisites (in addition to sgml-build.stamp creation).

> https://bugzilla.gnome.org/show_bug.cgi?id=592355
>   Doc generation doesn't work using "make -j3" when no DOC_MAIN_SGML_FILE exists

As I said in another bug report, building without $(DOC_MAIN_SGML_FILE)
should simply fail.  Period.  Remove the side-effect creation from
gtkdoc-mkdb.

If your manual isn't called [Insert title here] and located on-line
on server called [SERVER] you *must* hand-edit this file and have it in
the revision control system.  So you never build the package without
that file in practice.

The only occasion you may want it created for you is the very first
time the package is gtkdocized.  Perhaps gtkdocize could create it if it
does not exist (though you would have to give it paths to all the docs
directories).

If someone wants to generate it, then *he* must write a rule for that,
it should not be something gtk-doc does as a random side-effect.

> The second bugreport has a suggestion, but that changes the pattern used in the
> gtk-doc.make makefile snippets. It is using:

I remember I tried to consolidate the steps and found that something
broke.  Not something obvious, but more related to the fact that the
dependencies are sketchy and things are created as side-effects.

IIRC the key is that the step1.stamp rule that does not create its
target so it's run always (sort of). But why that I cannot recall.

Yeti



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]