GNOME Bugzilla – Bug 674314
Make gtk-doc not a hard dependency of GLib
Last modified: 2012-08-05 13:36:30 UTC
Created attachment 212273 [details] [review] Make gtk-doc not a hard dependency of GLib Currently is difficult to compile GLib from VCS on macos/windows, as you need to ship shim layers for gnome-doc-tools and gtk-doc/doocbook-xsl, to build from git. Post the patch here in case is useful for anyone
Review of attachment 212273 [details] [review]: You might note that people can also use http://git.gnome.org/browse/gtk-doc-stub ::: autogen.sh @@ +12,3 @@ + echo "You don't have gtk-doc installed, and thus" + echo "won't be able to generate the documentation." + NOGTKDOC=1 Double-negative variables are confusing; call it "HAVE_GTK_DOC=no" (and set HAVE_GTK_DOC=yes if we do have it ? @@ +27,3 @@ touch README INSTALL +if test -z "$NOGTKDOC"; then This would then be: test x$HAVE_GTK_DOC = xyes ::: docs/Makefile.am @@ +5,2 @@ SUBDIRS = reference +endif I think to be nice, you want to add it to DIST_SUBDIRS if ENABLE_GTK_DOC is false.
Created attachment 217696 [details] [review] Make gtk-doc not a hard dependency of GLib.v2 New patch
(In reply to comment #1) > ::: autogen.sh > @@ +12,3 @@ > + echo "You don't have gtk-doc installed, and thus" > + echo "won't be able to generate the documentation." > + NOGTKDOC=1 > > Double-negative variables are confusing; call it "HAVE_GTK_DOC=no" (and set > HAVE_GTK_DOC=yes if we do have it ? The new version doesnt have variables at all > ::: docs/Makefile.am > @@ +5,2 @@ > SUBDIRS = reference > +endif > > I think to be nice, you want to add it to DIST_SUBDIRS if ENABLE_GTK_DOC is > false. I think this is automatically done by automake. See http://www.gnu.org/software/automake/manual/html_node/SUBDIRS-vs-DIST_005fSUBDIRS.html
Review of attachment 217696 [details] [review]: The main question I have here is are you planning to patch all GNOME modules this way? Or just GLib? If the latter I can definitely understand, and agree it makes sense. It would let oe-core drop some nasty code: http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-core/glib-2.0/glib-2.0_2.32.3.bb#n30 But if we're going beyond GLib into all of GNOME, I really think maintaining a module like gtk-doc-stub centrally is a lot saner than having it copied into each user. ::: autogen.sh @@ +11,3 @@ if test -z $GTKDOCIZE; then + echo "You don't have gtk-doc installed, and thus won't be able to generate the documentation." + echo 'EXTRA_DIST =' > gtk-doc.make Is this really going to work? You can see what I ended up needing in gtk-doc-stub here: http://git.gnome.org/browse/gtk-doc-stub/tree/gtk-doc.make
(In reply to comment #4) > Review of attachment 217696 [details] [review]: > > The main question I have here is are you planning to patch all GNOME modules > this way? Or just GLib? No plans for other modules, just glib > ::: autogen.sh > @@ +11,3 @@ > if test -z $GTKDOCIZE; then > + echo "You don't have gtk-doc installed, and thus won't be able to > generate the documentation." > + echo 'EXTRA_DIST =' > gtk-doc.make > > Is this really going to work? You can see what I ended up needing in > gtk-doc-stub here: > http://git.gnome.org/browse/gtk-doc-stub/tree/gtk-doc.make it works here, Its a similar patch as the systemd one
Review of attachment 217696 [details] [review]: Ok. Can you add a link to the bug in the patch?
Comment on attachment 217696 [details] [review] Make gtk-doc not a hard dependency of GLib.v2 commit 0f6a092cc5a1cc82a02b23e9daa15159319f929c