GNOME Bugzilla – Bug 508897
[PATCH] Fix build when gtk-doc is not installed
Last modified: 2009-01-31 15:20:37 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.
Created attachment 102646 [details] [review] Add minus to fix install
Created attachment 102647 [details] [review] Change conditional to if
Also breaks when a version of gtk-doc before 1.9 is installed - gtkdoc-rebase is a new command.
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.
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
but then it must go to -installfiles=`echo $(srcdir)/html/*`; and not the line below?
Yes, that is correct. I had a typo in my patch.
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
*** Bug 510651 has been marked as a duplicate of this bug. ***
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.
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?