Title: [107164] trunk/Tools
- Revision
- 107164
- Author
- [email protected]
- Date
- 2012-02-08 18:28:31 -0800 (Wed, 08 Feb 2012)
Log Message
[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.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (107163 => 107164)
--- trunk/Tools/ChangeLog 2012-02-09 02:20:05 UTC (rev 107163)
+++ trunk/Tools/ChangeLog 2012-02-09 02:28:31 UTC (rev 107164)
@@ -1,3 +1,18 @@
+2012-02-08 Gustavo Noronha Silva <[email protected]>
+
+ [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 <[email protected]>
Remove Python 2.5 support from WebKit
Modified: trunk/Tools/GNUmakefile.am (107163 => 107164)
--- trunk/Tools/GNUmakefile.am 2012-02-09 02:20:05 UTC (rev 107163)
+++ trunk/Tools/GNUmakefile.am 2012-02-09 02:28:31 UTC (rev 107164)
@@ -326,7 +326,7 @@
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`; \
Modified: trunk/Tools/gtk/generate-gtkdoc (107163 => 107164)
--- trunk/Tools/gtk/generate-gtkdoc 2012-02-09 02:20:05 UTC (rev 107163)
+++ trunk/Tools/gtk/generate-gtkdoc 2012-02-09 02:28:31 UTC (rev 107164)
@@ -50,10 +50,19 @@
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():
Modified: trunk/Tools/gtk/gtkdoc.py (107163 => 107164)
--- trunk/Tools/gtk/gtkdoc.py 2012-02-09 02:20:05 UTC (rev 107163)
+++ trunk/Tools/gtk/gtkdoc.py 2012-02-09 02:28:31 UTC (rev 107164)
@@ -74,6 +74,11 @@
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):
@@ -356,13 +361,15 @@
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)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes