After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 162745 - Allow builds from GIMP CVS without gtk-doc
Allow builds from GIMP CVS without gtk-doc
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
git master
Other All
: Normal enhancement
: 2.2
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2005-01-02 21:24 UTC by Raphaël Quinet
Modified: 2005-01-22 18:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for autogen.sh and acinclude.m4 (5.56 KB, patch)
2005-01-02 21:27 UTC, Raphaël Quinet
needs-work Details | Review
revised patch for autogen.sh and acinclude.m4 (5.60 KB, patch)
2005-01-03 11:42 UTC, Raphaël Quinet
needs-work Details | Review
Updated patch for autogen.sh, HACKING and acinclude.m4 (5.58 KB, patch)
2005-01-16 21:50 UTC, Raphaël Quinet
none Details | Review
patch as applied to HEAD branch (9.02 KB, patch)
2005-01-20 18:25 UTC, Sven Neumann
none Details | Review

Description Raphaël Quinet 2005-01-02 21:24:15 UTC
As discussed a few days ago on the gimp-developer mailing list, it would be nice
to allow builds from CVS to skip the test for gtkdocize if the user does not
want to build the developer docs.  This is especially useful for those (like me)
who want to test the latest GIMP from CVS on multiple platforms without having
to install gtk-doc and its dependencies (jade or openjade, XSLT stuff...) on all
build machines.

In order to allow this, the patch included below modifies autogen.sh so that it
checks if the user has specified the option --disable-devel-docs (or similar
options, such as --enable-devel-docs=no).  If this option is included, then the
test for gtkdocize will be skipped and it will be possible to build the GIMP
without gtk-doc.  The patch also appends the contents of gtk-doc.m4 to
acinclude.m4 so that the Makefiles can be built correctly even if the user does
not have gtk-doc.m4.
Comment 1 Raphaël Quinet 2005-01-02 21:27:26 UTC
Created attachment 35366 [details] [review]
patch for autogen.sh and acinclude.m4

Here is the patch.  The contents of gtk-doc.m4 appended to acinclude.m4 are
from
gtk-doc 1.2.

Please tell me if I can commit the patch to HEAD (and maybe to the stable
branch
as well).
Comment 2 Sven Neumann 2005-01-02 23:18:23 UTC
The configure option for enabling or disabling the build of the docs is
--enable-gtk-doc or --disable-gtk-doc. Please change the patch accordingly.
Comment 3 Sven Neumann 2005-01-03 10:30:33 UTC
I also think that your patch makes autogen.sh unnecessarily complex. While it is
probably correct to adapt the command-line parser from configure, it is IMO just
plain overkill here. It should be sufficient to check if --enable-gtk-doc was
passed to autogen.sh or is in AUTOGEN_CONFIGURE_ARGS.
Comment 4 Raphaël Quinet 2005-01-03 11:17:41 UTC
Well, the option for the configure script is --disable-devel-docs (or --enable...)
and there are some lines in configure.in that will set --disable-gtk-doc if the
devel docs are disabled.  That's why I thought that it would be better to test the
"main" feature (devel-docs) instead of testing only the one that depends on it
(gtk-doc).  But I should probably check for both and include the same logic as in
the configure script.

If I have to check for both options, I think that it makes sense to keep the
command-line parsing code as it is now, even if it is unfortunately a bit complex.
Do you agree, or would you prefer to have explicit tests for --enable-gtk-doc,
--enable-devel-docs and the corresponding --disable... options?
Comment 5 Raphaël Quinet 2005-01-03 11:42:01 UTC
Created attachment 35383 [details] [review]
revised patch for autogen.sh and acinclude.m4

This new version of the patch checks for both --disable-devel-docs
and --disable-gtk-doc (devel-docs=no overrides gtk-doc, as in the
configure script).
Comment 6 Sven Neumann 2005-01-03 19:54:56 UTC
--disable-devel-docs would better be removed from your patch and from the
configure script. It was a bad idea to add it in the first place.
Comment 7 Carol 2005-01-10 23:59:06 UTC
I used this patch on my cvs checkout.  

It has a problem.  I run ./autogen.sh --help to get information like this:
  --disable-gtk-doc and
  --disable-gtk-doc 
which, to the best of my knowledge is where you get this sort of necessary
information.  The patch does not fix autogen.sh enough that it can tell you
important information -- or it fixes it incompletely or in the wrong place.

If these tools are as well designed as everyone said they are, it seems like it
would be more difficult to make them work this way than to make them work
properly.  Then again, I might be reading more into that situation than actually
exists as well.

Can a patch be made that works so you can get through the initial parts and
enough into the configuration to get this information? 
Comment 8 Sven Neumann 2005-01-11 09:22:00 UTC
Carol, despite of your useless ramblings, it had already been stated that the
patch needs work. And no, autogen.sh --help is not going to tell you everything
about the build process. There is no guarantee whatsoever that autogen.sh does
the right thing as it's just a stupid convenience wrapper which is explained in
the file HACKING and doesn't need to document itself.

The change to autogen.sh shouldn't be more than a few lines. We are not going to
duplicate autoconf in what's supposed to be a simple convenience script. It
would be completely sufficient if autogen.sh checked for --disable-gtk-doc.
Comment 9 Carol 2005-01-11 18:36:08 UTC
i will try in the future to remember that "your patch makes autogen.sh
unnecessarily complex" is more useful than being specific with exactly what the
problem is.

is there an easy solution for this patch that is "unnecessarily complex"?
Comment 10 Raphaël Quinet 2005-01-12 07:55:54 UTC
Ok, I will try to solve this.  Here is my proposal:
- Remove the option --disable-devel-docs from configure.in.  This may require
  some changes in some Makefiles or other files; I haven't checked yet.
- Change both autogen.sh so that the error message displayed when gtkdocize is
  not found suggests to use --disable-gtk-doc.
- Change my patch to autogen.sh so that it only checks for --enable-gtk-doc,
  --enable-gtk-doc=no and --disable-gtk-doc.  Note that I still have to have a
  loop and check for these three options because --disable* may be set in
  AUTOGEN_CONFIGURE_ARGS and then overriden by --enable* in the command-line
  arguments.
- Update the "Compilation" section in HACKING and mention that --enable-gtk-doc
  is the default for CVS builds (in the current version, the last paragraph
  incorrectly implies the contrary).

I will try to do that this evening.  Should I submit a patch here, or commit it
directly?
Comment 11 Sven Neumann 2005-01-13 00:18:21 UTC
A couple of corrections:

(1) --enable-gtk-doc is not the default, stating that would be wrong.
(2) your patch needs to check for --disable-gtk-doc and nothing else
(3) we need to add a note to HACKING that explains that passing --disable-gtk-doc
    to autogen.sh has the effect of completely disabling gtk-doc support
Comment 12 Raphaël Quinet 2005-01-16 21:50:11 UTC
Created attachment 36113 [details] [review]
Updated patch for autogen.sh, HACKING and acinclude.m4

OK, here is a new version of the patch.  It is shorter now.  I haven't removed
--disable-devel-docs from configure.in because I would like to be really sure
that nobody uses it.

Regarding your comments:
(1) OK, I have left that paragraph unchanged in the HACKING file.
(2) I prefer to add a test for --enable-*.  This only adds 3 lines so that's
    not a big deal.
(3) OK, I have added a paragraph about that to the HACKING file.  I also
    display a warning in autogen.sh if gtk-doc is disabled.
Comment 13 Raphaël Quinet 2005-01-18 10:33:09 UTC
Can I commit this patch?
Comment 14 Sven Neumann 2005-01-18 21:36:10 UTC
I haven't yet found time to review it but will definitely apply it before the
next 2.2 release.
Comment 15 Sven Neumann 2005-01-20 18:24:10 UTC
Applied to HEAD with some modifications:

2005-01-20  Sven Neumann  <sven@gimp.org>

        * HACKING
        * Makefile.am
        * acinclude.m4
        * autogen.sh: applied (modified) patch from Raphaël Quinet that
        allows to build GIMP from CVS without having gtk-doc installed.
        If you need to do this, pass --disable-gtk-doc to autogen.sh.

        * configure.in: removed --disable-devel-docs option since it has
        become obsolete now.

        * devel-docs/Makefile.am: require gtk-doc when running 'make dist'.

I am reluctant to do this change in the stable branch since it bears the risk of
breaking the build. Will think about it and keep the report open until this has
been figured out.
Comment 16 Sven Neumann 2005-01-20 18:25:27 UTC
Created attachment 36302 [details] [review]
patch as applied to HEAD branch

for reference, here's the patch as applied to the HEAD branch
Comment 17 Sven Neumann 2005-01-22 18:47:10 UTC
I have now merged these changes into the stable branch. Closing as FIXED.