Index: gtk-doc.make
===================================================================
--- gtk-doc.make (revision 518)
+++ gtk-doc.make (working copy)
@@ -139,7 +139,7 @@ install-data-local:
 	  done; \
 	  echo '-- Installing $(srcdir)/html/index.sgml' ; \
 	  $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR) || :; \
-	  if test `which gtkdoc-rebase` != ""; then \
+	  if test "`which gtkdoc-rebase`" != ""; then \
         gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$(DESTDIR)$(TARGET_DIR) ; \
 	  fi \
 	fi
Index: ChangeLog
===================================================================
--- ChangeLog (revision 518)
+++ ChangeLog (working copy)
@@ -1,3 +1,10 @@
+2007-12-02  Loïc Minier  <lool@dooz.org>
+
+	* gtk-doc.make:
+	  Add double-quotes around `which gtkdoc-rebase` to prevent "test"
+	  from failing with "/bin/sh: line 11: test: !=: unary operator
+	  expected ".  Fixes #501066.
+
 2007-11-11  Stefan Kost  <ensonic@users.sf.net>
 
 	patch by: David Nečas <yeti@physics.muni.cz>
