https://bugs.webkit.org/show_bug.cgi?id=78177
Reviewed by Martin Robinson.
* GNUmakefile.am: Pass DESTDIR on to generate-gtkdoc, when
calling it for rebasing.
* gtk/generate-gtkdoc:
(get_common_options): Handle the new --virtual-root option.
* gtk/gtkdoc.py:
(GTKDoc.rebase_installed_docs): If a virtual-root has been given, pass
it on to gtkdoc-rebase as dest-dir, and prefix the htmldir with it.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107164
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-02-08 Gustavo Noronha Silva <gns@gnome.org>
+
+ [GTK] doc rebasing does not respect DESTDIR
+ https://bugs.webkit.org/show_bug.cgi?id=78177
+
+ Reviewed by Martin Robinson.
+
+ * GNUmakefile.am: Pass DESTDIR on to generate-gtkdoc, when
+ calling it for rebasing.
+ * gtk/generate-gtkdoc:
+ (get_common_options): Handle the new --virtual-root option.
+ * gtk/gtkdoc.py:
+ (GTKDoc.rebase_installed_docs): If a virtual-root has been given, pass
+ it on to gtkdoc-rebase as dest-dir, and prefix the htmldir with it.
+
2012-02-08 Adam Barth <abarth@webkit.org>
Remove Python 2.5 support from WebKit
fi; \
fi
endif
- $(srcdir)/Tools/gtk/generate-gtkdoc --rebase
+ $(srcdir)/Tools/gtk/generate-gtkdoc --rebase --virtual-root=$${DESTDIR}
uninstall-local:
@DOC_MODULE_VERSION=`cat ./Documentation/webkitgtk/version.xml`; \
def get_common_options():
+ # TODO: We should consider using an arguments parsing library if
+ # we need more of these complex ones.
+ virtual_root = ''
+ for argument in sys.argv:
+ if argument.startswith('--virtual-root='):
+ virtual_root = argument.split('=')[1]
+ break
+
return {
'decorator': 'WEBKIT_API',
'deprecation_guard': 'WEBKIT_DISABLE_DEPRECATED',
'library_path' : common.build_path('.libs'),
+ 'virtual_root' : virtual_root,
}
def get_common_xref_deps():
interactive -- Whether or not errors or warnings should prompt the user
to continue or not. When this value is false, generation
will continue despite warnings. (default False)
+
+ virtual_root -- A temporary installation directory which is used as the root
+ where the actual installation prefix lives; this is mostly
+ useful for packagers, and should be set to what is given to
+ make install as DESTDIR.
"""
def __init__(self, args):
self._run_command(args, cwd=self.output_dir, ignore_warnings=True)
def rebase_installed_docs(self):
- html_dir = os.path.join(self.prefix, 'share', 'gtk-doc', 'html', self.module_name)
+ html_dir = os.path.join(self.virtual_root + self.prefix, 'share', 'gtk-doc', 'html', self.module_name)
if not os.path.isdir(html_dir):
return
args = ['gtkdoc-rebase',
'--relative',
'--html-dir=%s' % html_dir]
args.extend(['--other-dir=%s' % extra_dir for extra_dir in self.cross_reference_deps])
+ if self.virtual_root:
+ args.extend(['--dest-dir=%s' % self.virtual_root])
self._run_command(args, cwd=self.output_dir)