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 508897 - [PATCH] Fix build when gtk-doc is not installed
[PATCH] Fix build when gtk-doc is not installed
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
unspecified
Other FreeBSD
: Normal major
: 1.10
Assigned To: gtk-doc maintainers
gtk-doc maintainers
: 510651 (view as bug list)
Depends on:
Blocks: 509192
 
 
Reported: 2008-01-12 06:12 UTC by Joe Marcus Clarke
Modified: 2009-01-31 15:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add minus to fix install (426 bytes, patch)
2008-01-12 06:17 UTC, Joe Marcus Clarke
reviewed Details | Review
Change conditional to if (495 bytes, patch)
2008-01-12 06:18 UTC, Joe Marcus Clarke
rejected Details | Review

Description Joe Marcus Clarke 2008-01-12 06:12:54 UTC
Some modules have been using the SVN version of gtk-doc which has this in gtk-doc.make's install-data-local target:

...
    which gtkdoc-rebase >/dev/null && \
        gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$(DESTDIR)$(TARGET_DIR) ; \

This breaks installation on FreeBSD (and probably other platforms) when gtk-doc is not installed.  Take this example Makefile:

all:
    which bad-command >/dev/null &&
        bad-command --do-things

% make
which bad-command >/dev/null && \
	    bad-command --do-things
gmake: *** [all] Error 1

This line should either have a '-' in front of it, or it needs to be changed to:

if which gtkdoc-rebase >/dev/null; then \
    gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$(DESTDIR)$(TARGET_DIR) ; \
fi ; \

I've included both options as diffs.  The latter patch was created by Roy Marples in order to allow evolution-data-server 1.12.3 and goffice 0.6.1 to install on FreeBSD.
Comment 1 Joe Marcus Clarke 2008-01-12 06:17:47 UTC
Created attachment 102646 [details] [review]
Add minus to fix install
Comment 2 Joe Marcus Clarke 2008-01-12 06:18:16 UTC
Created attachment 102647 [details] [review]
Change conditional to if
Comment 3 Ed Catmur 2008-01-13 18:31:41 UTC
Also breaks when a version of gtk-doc before 1.9 is installed - gtkdoc-rebase is a new command.
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2008-01-14 18:04:21 UTC
The patches are different, the minus one is applied to 
  if test "$$installfiles" = '$(srcdir)/html/*';
and not
  which gtkdoc-rebase >/dev/null

where i will now apply it. That which statement was an if before, but apperantly that was not good for everybody either.
Comment 5 Joe Marcus Clarke 2008-01-14 18:16:20 UTC
I don't think the minus can be directly applied to the "which" line since that is not the beginning of a line, but rather a continuation of the previous line.  That is:

all:
        echo "Doing something"; \
        -which bad-command && \
                bad-command --do-something

Will result in:

echo "Doing something"; \
	-which bad-command && \
		bad-command --do-something
Doing something
-which: not found
gmake: *** [all] Error 127
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2008-01-14 19:12:33 UTC
but then it must go to
-installfiles=`echo $(srcdir)/html/*`;
and not the line below?
Comment 7 Joe Marcus Clarke 2008-01-14 19:16:00 UTC
Yes, that is correct.  I had a typo in my patch.
Comment 8 Stefan Sauer (gstreamer, gtkdoc dev) 2008-01-14 19:23:30 UTC
2008-01-14  Stefan Kost  <ensonic@users.sf.net>

	patch by: Joe Marcus Clarke <marcus@freebsd.org>

	* gtk-doc.make:
	* gtk-doc.notmpl.make:
	  Do not abort the build, if gtk-doc is not installed. Fixes #508897

Comment 9 Stefan Sauer (gstreamer, gtkdoc dev) 2008-01-22 06:55:51 UTC
*** Bug 510651 has been marked as a duplicate of this bug. ***
Comment 10 Chad Harp 2009-01-30 19:44:39 UTC
appears to be broken for solaris again in revision 615

solaris which always exits 0, so 

  ! which gtkdoc-rebase >/dev/null 2>&1 || ...

will always be false.
Comment 11 Stefan Sauer (gstreamer, gtkdoc dev) 2009-01-31 15:20:37 UTC
This is not used anymore. Latest version is Revision 673. The change that should work across the platforms is in
http://svn.gnome.org/viewvc/gtk-doc?view=revision&revision=635

Chad, could you please retest and let me know if trunk works?