GNOME Bugzilla – Bug 666509
Specifying --enable-gtk-doc should not be required to build source packages
Last modified: 2014-02-11 20:58:12 UTC
Hi, I got a bit frustrated when 'make dist' did not work for my project because I had not configured it with '--enable-gtk-doc'. Thinking about that, I concluded that the enable/disable-gtk-doc option is not supposed to influence what goes into a source package. After all, having to always specify --enable-gtk-doc when doing a 'make dist' implies gtk-doc documentation is always included in source packages. So, when running 'make dist', gtk-docs can be build independent of the enable-gtk-doc configure option, thus making life just a little bit easier for package release managers. I will attach a patch to do this later.
Created attachment 203860 [details] [review] 0001-Do-not-require-enable-gtk-doc-to-build-source-packag.patch
what about putting this to Makefile.am DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc seems to be what a lot of gnome modules do: > find . -name Makefile.am -exec grep -Hn "DISTCHECK_CONFIGURE_FLAGS" {} \; | grep enable-gtk-doc | wc -l 66
It seems that the proposed patch is nicer than forcing work-arounds in all users of gtk-doc.
(In reply to comment #2) > what about putting this to Makefile.am > > DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc Even when you put this in your Makefile.am, you still have to remember to run ./configure --enable-gtk-doc When you simply run ./configure then running 'make dist' or 'make distcheck' will fail. So patching this has two advantages: 1. No need for every user of gtk-doc to add a DISTCHECK_CONFIGURE_FLAGS to their Makefile.am 2. No need for specifying an extra argument to ./configure
But "make dist" needs gtk-doc to be enabled so that pre-generated docs are disted. How would that work in your case?
commit af19cf4b8447386d909aff46fb88b3ca64eab243 Author: Stefan Sauer <ensonic@users.sf.net> Date: Sun Feb 9 10:55:54 2014 +0100 docs: mention DISTCHECK_CONFIGURE_FLAGS in the manual Explain how to ensure that make dist will include prebuild docs.
> But "make dist" needs gtk-doc to be enabled so that pre-generated docs are > disted. How would that work in your case? The configure switch '--enable-gtk-doc' would only influence the building of the documentation for the default make target, thus './configure && make' would not build documentation, while './configue --enable-gtk-doc' would build the documentation (just like it is now). What I propose to change is that building the 'dist' make target would always imply building the documentation, independent of the '--enable-gtk-doc' option given to './configure'. When the documentation was not yet build in the 'make' fase, it can be build automatically in the 'make dist' fase.
(In reply to comment #6) > commit af19cf4b8447386d909aff46fb88b3ca64eab243 > Author: Stefan Sauer <ensonic@users.sf.net> > Date: Sun Feb 9 10:55:54 2014 +0100 > > docs: mention DISTCHECK_CONFIGURE_FLAGS in the manual > > Explain how to ensure that make dist will include prebuild docs. This was already in the manual, it is now mentioned twice: https://git.gnome.org/browse/gtk-doc/tree/help/manual/C/index.docbook#n502 https://git.gnome.org/browse/gtk-doc/tree/help/manual/C/index.docbook#n557
Reverted the extra docblob, thanks for the headsup. Could you update the patch? CONFLICT (content): Merge conflict in gtk-doc.notmpl.make Auto-merging gtk-doc.make CONFLICT (content): Merge conflict in gtk-doc.make Auto-merging gtk-doc.m4 CONFLICT (content): Merge conflict in gtk-doc.m4 What worries me is that we have to do all these extra things. Do other tools need to go through all these hoops as well? It seems that enabling --enable-gtk-doc on configure as a developer is fine and so is also setting the DISTCHECK_CONFIGURE_FLAGS. I agree that it is bad that if the developer has not set --enable-gtk-doc distcheck fails, but how likely is that. As a developer you almost always want to have this enabled, right?
(In reply to comment #9) > What worries me is that we have to do all these extra things. Do other tools > need to go through all these hoops as well? By fixing this in gtk-doc.m4, we fix this automatically for all projects using gtk-doc. > It seems that enabling > --enable-gtk-doc on configure as a developer is fine and so is also setting the > DISTCHECK_CONFIGURE_FLAGS. It creates two things a project/developer that uses gtk-doc can do wrong, without any good reason. It hinders a 'works out-of-the-box' experience. > I agree that it is bad that if the developer has not > set --enable-gtk-doc distcheck fails, but how likely is that. As a developer > you almost always want to have this enabled, right? I am afraid most developers do not build documentation by default and only do this when doing a 'make dist'.
Created attachment 268588 [details] [review] 0001-Do-not-require-enable-gtk-doc-to-build-source-packag.patch Rebased on current master.
The following fix has been pushed: cf5a300 Do not require --enable-gtk-doc to build source packages
Created attachment 268589 [details] [review] Do not require --enable-gtk-doc to build source packages This allows packages that use GTK_DOC_CHECK to build a source package without having to explicitly request '--enable-gtk-doc'. Fixes bug #666509.
Pushed, lets see what happens.
pango is currently failing to build due to gtk-doc.make:270: error: HAVE_GTK_DOC does not appear in AM_CONDITIONAL Can you please take a look?
Re comment 15, I believe it is a case of a stale m4 file.
I have done a fresh jhbuild of pango and it seems to work fine, so I guess it is indeed a stale m4 file. Maybe it helps to remove pango/aclocal.m4.