diff -up gst-plugins-bad-0.10.23/common/gtk-doc.mak.docbuild gst-plugins-bad-0.10.23/common/gtk-doc.mak
--- gst-plugins-bad-0.10.23/common/gtk-doc.mak.docbuild	2011-12-30 19:32:24.000000000 +0100
+++ gst-plugins-bad-0.10.23/common/gtk-doc.mak	2016-08-09 15:51:04.821382866 +0200
@@ -121,19 +121,17 @@ html-build.stamp: sgml.stamp $(DOC_MAIN_
 	@cp ../version.entities ./
 	@mkhtml_options=""; \
 	gtkdoc-mkhtml 2>&1 --help | grep  >/dev/null "\-\-verbose"; \
-	if test "$(?)" = "0"; then \
+	if test "$$? = "0"; then \
 	  if test "x$(V)" = "x1"; then \
 	    mkhtml_options="$$mkhtml_options --verbose"; \
 	  fi; \
 	fi; \
-	@gtkdoc-mkhtml 2>&1 --help | grep  >/dev/null "\-\-path"; \
-	if test "$(?)" = "0"; then \
+	gtkdoc-mkhtml 2>&1 --help | grep  >/dev/null "\-\-path"; \
+	if test "$$? = "0"; then \
 	  mkhtml_options=--path="$(abs_srcdir)"; \
 	fi; \
-	cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
-	@mv html/index.sgml html/index.sgml.bak
-	@$(SED) "s/ href=\"$(DOC_MODULE)\// href=\"$(DOC_MODULE)-@GST_MAJORMINOR@\//g" html/index.sgml.bak >html/index.sgml
-	@rm -f html/index.sgml.bak
+	cd html && gtkdoc-mkhtml $$mkhtml_options $(DOC_MODULE)-@GST_MAJORMINOR@ $(DOC_MAIN_SGML_FILE)
+	@rm -f html/$(DOC_MAIN_SGML_FILE)
 	@rm -rf html/xml
 	@rm -f version.entities
 	@test "x$(HTML_IMAGES)" = "x" ||  ( cd $(srcdir) && cp $(HTML_IMAGES) $(abs_builddir)/html )
@@ -189,9 +187,9 @@ install-data-local:
 	    echo '-- Installing '$$i ; \
 	    $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
 	  done; \
-	  echo '-- Installing $(builddir)/html/$(DOC_MODULE).devhelp2' ; \
-	  if test -e $(builddir)/html/$(DOC_MODULE).devhelp2; then \
-	            $(INSTALL_DATA) $(builddir)/html/$(DOC_MODULE).devhelp2 \
+	  echo '-- Installing $(builddir)/html/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2' ; \
+	  if test -e $(builddir)/html/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2; then \
+	  			$(INSTALL_DATA) $(builddir)/html/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2 \
 	            $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2; \
 	  fi; \
 	  (which gtkdoc-rebase >/dev/null && \
diff -up gst-plugins-bad-0.10.23/common/gtk-doc-plugins.mak.docbuild gst-plugins-bad-0.10.23/common/gtk-doc-plugins.mak
--- gst-plugins-bad-0.10.23/common/gtk-doc-plugins.mak.docbuild	2011-12-30 19:32:24.000000000 +0100
+++ gst-plugins-bad-0.10.23/common/gtk-doc-plugins.mak	2016-08-09 15:59:02.264160398 +0200
@@ -218,15 +218,12 @@ html-build.stamp: sgml.stamp $(DOC_MAIN_
 	@cp ../version.entities html
 	@mkhtml_options=""; \
 	gtkdoc-mkhtml 2>&1 --help | grep  >/dev/null "\-\-verbose"; \
-	if test "$(?)" = "0"; then \
+	if test "$$?" = "0"; then \
 	  if test "x$(V)" = "x1"; then \
 	    mkhtml_options="$$mkhtml_options --verbose"; \
 	  fi; \
 	fi; \
-	cd html && gtkdoc-mkhtml $$mkhtml_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE)
-	@mv html/index.sgml html/index.sgml.bak
-	@$(SED) "s/ href=\"$(DOC_MODULE)\// href=\"$(DOC_MODULE)-@GST_MAJORMINOR@\//g" html/index.sgml.bak >html/index.sgml
-	@rm -f html/index.sgml.bak
+	cd html && gtkdoc-mkhtml $$mkhtml_options $(DOC_MODULE)-@GST_MAJORMINOR@ $(DOC_MAIN_SGML_FILE)
 	@rm -f html/$(DOC_MAIN_SGML_FILE)
 	@rm -rf html/xml
 	@rm -f html/version.entities
diff -up gst-plugins-bad-0.10.23/docs/libs/Makefile.in.docbuild gst-plugins-bad-0.10.23/docs/libs/Makefile.in
--- gst-plugins-bad-0.10.23/docs/libs/Makefile.in.docbuild	2012-02-28 20:13:59.000000000 +0100
+++ gst-plugins-bad-0.10.23/docs/libs/Makefile.in	2016-08-09 15:56:57.850520970 +0200
@@ -933,19 +933,17 @@ upload: $(FORMATS)
 @ENABLE_GTK_DOC_TRUE@	@cp ../version.entities ./
 @ENABLE_GTK_DOC_TRUE@	@mkhtml_options=""; \
 @ENABLE_GTK_DOC_TRUE@	gtkdoc-mkhtml 2>&1 --help | grep  >/dev/null "\-\-verbose"; \
-@ENABLE_GTK_DOC_TRUE@	if test "$(?)" = "0"; then \
+@ENABLE_GTK_DOC_TRUE@	if test "$$?" = "0"; then \
 @ENABLE_GTK_DOC_TRUE@	  if test "x$(V)" = "x1"; then \
 @ENABLE_GTK_DOC_TRUE@	    mkhtml_options="$$mkhtml_options --verbose"; \
 @ENABLE_GTK_DOC_TRUE@	  fi; \
 @ENABLE_GTK_DOC_TRUE@	fi; \
-@ENABLE_GTK_DOC_TRUE@	@gtkdoc-mkhtml 2>&1 --help | grep  >/dev/null "\-\-path"; \
-@ENABLE_GTK_DOC_TRUE@	if test "$(?)" = "0"; then \
+@ENABLE_GTK_DOC_TRUE@	gtkdoc-mkhtml 2>&1 --help | grep  >/dev/null "\-\-path"; \
+@ENABLE_GTK_DOC_TRUE@	if test "$$?" = "0"; then \
 @ENABLE_GTK_DOC_TRUE@	  mkhtml_options=--path="$(abs_srcdir)"; \
 @ENABLE_GTK_DOC_TRUE@	fi; \
-@ENABLE_GTK_DOC_TRUE@	cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
-@ENABLE_GTK_DOC_TRUE@	@mv html/index.sgml html/index.sgml.bak
-@ENABLE_GTK_DOC_TRUE@	@$(SED) "s/ href=\"$(DOC_MODULE)\// href=\"$(DOC_MODULE)-@GST_MAJORMINOR@\//g" html/index.sgml.bak >html/index.sgml
-@ENABLE_GTK_DOC_TRUE@	@rm -f html/index.sgml.bak
+@ENABLE_GTK_DOC_TRUE@	cd html && gtkdoc-mkhtml $$mkhtml_options $(DOC_MODULE)-@GST_MAJORMINOR@ $(DOC_MAIN_SGML_FILE)
+@ENABLE_GTK_DOC_TRUE@	@rm -f html/$(DOC_MAIN_SGML_FILE)
 @ENABLE_GTK_DOC_TRUE@	@rm -rf html/xml
 @ENABLE_GTK_DOC_TRUE@	@rm -f version.entities
 @ENABLE_GTK_DOC_TRUE@	@test "x$(HTML_IMAGES)" = "x" ||  ( cd $(srcdir) && cp $(HTML_IMAGES) $(abs_builddir)/html )
@@ -999,9 +997,9 @@ install-data-local:
 	    echo '-- Installing '$$i ; \
 	    $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
 	  done; \
-	  echo '-- Installing $(builddir)/html/$(DOC_MODULE).devhelp2' ; \
-	  if test -e $(builddir)/html/$(DOC_MODULE).devhelp2; then \
-	            $(INSTALL_DATA) $(builddir)/html/$(DOC_MODULE).devhelp2 \
+	  echo '-- Installing $(builddir)/html/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2' ; \
+	  if test -e $(builddir)/html/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2; then \
+	  			$(INSTALL_DATA) $(builddir)/html/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2 \
 	            $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2; \
 	  fi; \
 	  (which gtkdoc-rebase >/dev/null && \
diff -up gst-plugins-bad-0.10.23/docs/plugins/Makefile.in.docbuild gst-plugins-bad-0.10.23/docs/plugins/Makefile.in
--- gst-plugins-bad-0.10.23/docs/plugins/Makefile.in.docbuild	2012-02-28 20:13:59.000000000 +0100
+++ gst-plugins-bad-0.10.23/docs/plugins/Makefile.in	2016-08-09 15:54:00.964455982 +0200
@@ -1374,15 +1374,12 @@ update:
 @ENABLE_GTK_DOC_TRUE@	@cp ../version.entities html
 @ENABLE_GTK_DOC_TRUE@	@mkhtml_options=""; \
 @ENABLE_GTK_DOC_TRUE@	gtkdoc-mkhtml 2>&1 --help | grep  >/dev/null "\-\-verbose"; \
-@ENABLE_GTK_DOC_TRUE@	if test "$(?)" = "0"; then \
+@ENABLE_GTK_DOC_TRUE@	if test "$$?" = "0"; then \
 @ENABLE_GTK_DOC_TRUE@	  if test "x$(V)" = "x1"; then \
 @ENABLE_GTK_DOC_TRUE@	    mkhtml_options="$$mkhtml_options --verbose"; \
 @ENABLE_GTK_DOC_TRUE@	  fi; \
 @ENABLE_GTK_DOC_TRUE@	fi; \
-@ENABLE_GTK_DOC_TRUE@	cd html && gtkdoc-mkhtml $$mkhtml_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE)
-@ENABLE_GTK_DOC_TRUE@	@mv html/index.sgml html/index.sgml.bak
-@ENABLE_GTK_DOC_TRUE@	@$(SED) "s/ href=\"$(DOC_MODULE)\// href=\"$(DOC_MODULE)-@GST_MAJORMINOR@\//g" html/index.sgml.bak >html/index.sgml
-@ENABLE_GTK_DOC_TRUE@	@rm -f html/index.sgml.bak
+@ENABLE_GTK_DOC_TRUE@	cd html && gtkdoc-mkhtml $$mkhtml_options $(DOC_MODULE)-@GST_MAJORMINOR@ $(DOC_MAIN_SGML_FILE)
 @ENABLE_GTK_DOC_TRUE@	@rm -f html/$(DOC_MAIN_SGML_FILE)
 @ENABLE_GTK_DOC_TRUE@	@rm -rf html/xml
 @ENABLE_GTK_DOC_TRUE@	@rm -f html/version.entities
