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 577059 - Gnome-doc support can't be disabled
Gnome-doc support can't be disabled
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
unspecified
Other Mac OS
: Normal normal
: 1.12
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2009-03-28 10:58 UTC by Richard Hult
Modified: 2009-06-27 20:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Disable help for --disable-scrollkeeper (883 bytes, patch)
2009-03-28 10:59 UTC, Richard Hult
none Details | Review
Get rid of scrollkeeper hard dependency using GNOME_DOC_INIT (1.34 KB, patch)
2009-04-20 17:52 UTC, Nicola Fontana
none Details | Review
Patch against b744f5245fdb563241afd0550de0e97a158d2fc2 (2.82 KB, patch)
2009-04-23 19:34 UTC, Nicola Fontana
committed Details | Review

Description Richard Hult 2009-03-28 10:58:14 UTC
It seems like you can't build without gnome-doc support. At least some packages use the conditional that gnome-doc-utils provide, --disable-scrollkeeper and the ENABLE_SK variable.

A simple fix could be to only add help/ to subdirs if ENABLE_SK is set. Will attach a patch.

It's quite hard to setup the doc build on mac and no real gain, since the help system is completely different anyway. We have solved this so far by installing the gnome-doc-utils just to get the m4 and pc files to get packages to configure correctly, and then building them with --disable-scrollkeeper.

I'm not sure if the patch is the best way, but at least it works.
Comment 1 Richard Hult 2009-03-28 10:59:05 UTC
Created attachment 131547 [details] [review]
Disable help for --disable-scrollkeeper
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2009-04-15 11:07:26 UTC
find . -name "Makefile" -exec grep -Hn "ENABLE_SK" {} \;
./help/manual/Makefile:217:_ENABLE_SK = true
./help/manual/Makefile:230:	$(if $(_ENABLE_SK),							\
./help/manual/Makefile:573:	@test "x$(_ENABLE_SK)" != "xtrue" -o -f "$(_skcontentslist)" || {	\
./help/manual/Makefile:581:	@test "x$(_ENABLE_SK)" != "xtrue" -o -f "$(_skcontentslist)" || {	\
./help/manual/Makefile:818:	@if test "x$(_ENABLE_SK)" = "xtrue"; then \
./help/manual/Makefile:848:	  if test "x$(_ENABLE_SK)" = "xtrue"; then \

so there seems to be _ENABLE_SK, shall I use that? 
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2009-04-15 11:31:02 UTC
Richard, could you try latest svn and let me know if that now works. It should build without gnome-doc-utils/scrollkeeper again.

2009-04-15  Stefan Kost  <ensonic@users.sf.net>

	* autogen.sh:
	* configure.in:
	  Tentative patch to allow building without scrollkeeper and
	  gnome-doc-utils. Fixes #577059.

Comment 4 Nicola Fontana 2009-04-18 17:40:17 UTC
The m4/gnome-doc-utils.m4 stored in the repository is a bare symlink, it is not included in svn. You can see it here:

http://svn.gnome.org/svn/gtk-doc/trunk/m4/gnome-doc-utils.m4
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2009-04-19 11:33:42 UTC
Hmm, need to wait for the git-migation to finish and repait it, but imho that would be a bug in svn. Submitting a link as such hardly makes any sense.

If that link is updated with the real file, does it work then?
Comment 6 Nicola Fontana 2009-04-19 12:16:17 UTC
I was also totally unaware svn doesn't follow symlinks: took me a while to find this problem.

Anyway I substituted the guilty symlink with http://svn.gnome.org/svn/gnome-doc-utils/trunk/tools/gnome-doc-utils.m4 and this is the result:

$ ./autogen.sh --disable-scrollkeeper
* Running aclocal-1.10
/usr/share/aclocal/audiofile.m4:12: warning: underquoted definition of AM_PATH_AUDIOFILE
/usr/share/aclocal/audiofile.m4:12:   run info '(automake)Extending aclocal'
/usr/share/aclocal/audiofile.m4:12:   or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
* Running autoconf
* Running libtoolize
* Running automake-1.10
automake-1.10: cannot open < gnome-doc-utils.make: No such file or directory

After a "touch gnome-doc-utils.make" gtk-doc builds fine.
Comment 7 Stefan Sauer (gstreamer, gtkdoc dev) 2009-04-20 12:56:15 UTC
commit e6f1f5494bfd077fcea8f2f1cdbb97464a34c140
Author: Stefan Kost <ensonic@users.sf.net>
Date:   Mon Apr 20 15:52:28 2009 +0300

    docbuild: use --copy during bootstrap, make doc uild more conditional
    
    Using --copy for gnome-doc-prepare ensure we don't commit symlinks to the
    repo. Furthermore we make manual subdir conditional for HAVE_GNOME_DOC_UTILS.

Better?
Comment 8 Nicola Fontana 2009-04-20 17:52:22 UTC
Created attachment 132968 [details] [review]
Get rid of scrollkeeper hard dependency using GNOME_DOC_INIT
Comment 9 Nicola Fontana 2009-04-20 17:58:21 UTC
Sorry Stefan, I forgot to mention I commented out GNOME_DOC_INIT to be able to build. What about the approach used in my new patch? In any case, there are still some issues on "make dist":

$ make dist
...
make[3]: Entering directory `/home/nicola/sandbox/gtk-doc/help/manual'
make[3]: *** No rule to make target `doc-dist-hook', needed by `dist-hook'.  Stop.
Comment 10 Stefan Sauer (gstreamer, gtkdoc dev) 2009-04-22 10:59:58 UTC
(stefan thinking aloud)

Nicola, if you change HAVE_GNOME_DOC_UTILS in gtk-doc/help/Makefile.am to ENABLE_SK does make dist then work?
Not sure if that is the proper fix, as were taking about two things GNOME_DOC_UTILS and SCROLL_KEEPER. gnome-doc-utils are used to format the docbook xml to e.g. html and scrollkeeper to register it with the help browser.
Scollkeeper is a platform dependency, it des not make sense to call it on windows, even if if would have been ported. Instead one would probably want to convert docbook to chm there and do something instead of scrollkeeper to install the chm.

Unfortunately there is only --disable-scrollkeeper. One more thing would be to set AM_CONDITIONAL HAVE_GNOME_DOC_UTILS to no as a ACTION-IF-NOT-FOUND in NOME_DOC_INIT. Can you try that?
Comment 11 Nicola Fontana 2009-04-23 19:31:53 UTC
Now I got it: gnome-doc-utils and scrollkeeper are used to manage the gtk-doc docs. I always implied gtk-doc was used to document itself.

Anyway, neither ENABLE_SK or an AM_CONDITIONAL(HAVE_GNOME_UTILS,no) worked, as SUBDIR components (inside false conditions or not) are always included by the "dist" target. To let it work, I had to put DIST_SUBDIRS = $(SUBDIRS) at the end of help/Makefile.am. In my opinion this is quite insane, as you'll end up with a double headed dist target.

My suggestion is to disable the dist target if gnome-doc-utils is not found (idea borrowed from gtk-doc.make). In the new patch I added also some cosmetic changes. enable_scrollkeeper=no is needed only to get a proper notice: ENABLE_SK remains anyway undefined if gnome-doc-utils is not found, and so false. I still think the scrollkeeper disabilitation should be in configure.in instead of autogen.sh as the former goes in the tarball, anyway there could be plenty of details I'm not aware of.

I tried the build without both gnome-doc-utils and scrollkeeper and works as expected ("make dist" fails giving the error message).

After installing gnome-doc-utils, I had to manually --disable-scrollkeeper as per default it was enabled (and the dumb gnome-doc-utils.m4 does not check for it). After that I was able to "make dist" without errors.

I'm lacking the third scenario (gnome-doc-utils and scrollkeeper installed) because I don't have a gnome environment.

Still there is a little issue, not strictly related to this topic: I cannot understand why gnome-doc-utils.make is both in DISTCLEANFILES and EXTRA_DIST. After any "make distclean" I have to manually generate it.
Comment 12 Nicola Fontana 2009-04-23 19:34:55 UTC
Created attachment 133205 [details] [review]
Patch against b744f5245fdb563241afd0550de0e97a158d2fc2

Implements what reported above
Comment 13 Stefan Sauer (gstreamer, gtkdoc dev) 2009-06-27 20:10:21 UTC
Sorry, I forgot about the patch.

commit 4335ba988d0258e775f7df657ab3d139d5a97c02
Author: Nicola Fontana <ntd@entidi.it>
Date:   Sat Jun 27 23:09:03 2009 +0300

    build: allow building without gnome-doc-utils, Fixes #577059