From 32761a6cee1d0dee366b885b7b9c777e67885688 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Sun, 10 Apr 2016 09:28:39 +0000 Subject: webkitgtk-2.4.11 --- Tools/gtk/gtkdoc.py | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'Tools/gtk/gtkdoc.py') diff --git a/Tools/gtk/gtkdoc.py b/Tools/gtk/gtkdoc.py index 4c8237b0e..5aff6fc9b 100644 --- a/Tools/gtk/gtkdoc.py +++ b/Tools/gtk/gtkdoc.py @@ -141,6 +141,7 @@ class GTKDoc(object): self._write_version_xml() self._run_gtkdoc_scan() self._run_gtkdoc_scangobj() + self._run_gtkdoc_mktmpl() self._run_gtkdoc_mkdb() if not html: @@ -194,15 +195,9 @@ class GTKDoc(object): if print_output: if stdout: - try: - sys.stdout.write(stdout.encode("utf-8")) - except UnicodeDecodeError: - sys.stdout.write(stdout) + sys.stdout.write(stdout.encode("utf-8")) if stderr: - try: - sys.stderr.write(stderr.encode("utf-8")) - except UnicodeDecodeError: - sys.stderr.write(stderr) + sys.stderr.write(stderr.encode("utf-8")) if process.returncode != 0: raise Exception('%s produced a non-zero return code %i' @@ -312,11 +307,7 @@ class GTKDoc(object): env = os.environ ldflags = self.ldflags if self.library_path: - additional_ldflags = '' - for arg in env.get('LDFLAGS', '').split(' '): - if arg.startswith('-L'): - additional_ldflags = '%s %s' % (additional_ldflags, arg) - ldflags = ' "-L%s" %s ' % (self.library_path, additional_ldflags) + ldflags + ldflags = ' "-L%s" ' % self.library_path + ldflags current_ld_library_path = env.get('LD_LIBRARY_PATH') if current_ld_library_path: env['RUN'] = 'LD_LIBRARY_PATH="%s:%s" ' % (self.library_path, current_ld_library_path) @@ -337,6 +328,10 @@ class GTKDoc(object): self._run_command(['gtkdoc-scangobj', '--module=%s' % self.module_name], env=env, cwd=self.output_dir) + def _run_gtkdoc_mktmpl(self): + args = ['gtkdoc-mktmpl', '--module=%s' % self.module_name] + self._run_command(args, cwd=self.output_dir) + def _run_gtkdoc_mkdb(self): sgml_file = os.path.join(self.output_dir, self.main_sgml_file) self._raise_exception_if_file_inaccessible(sgml_file) -- cgit v1.2.1