mkhtml2: if linkend does not resolve output inner data
[gtk-doc.git] / gtkdoc-mkdb.in
blob42d5731ff26d32419a5da827ab3ccceba40d7f52
1 #!@PYTHON@
2 # -*- python; coding: utf-8 -*-
4 # gtk-doc - GTK DocBook documentation generator.
5 # Copyright (C) 1998  Damon Chaplin
6 #               2007-2016  Stefan Sauer
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 from __future__ import print_function
25 import argparse
26 import sys
27 sys.path.append('@PYTHON_PACKAGE_DIR@')
29 from gtkdoc import common, config, mkdb
31 if __name__ == '__main__':
32     parser = argparse.ArgumentParser()
33     parser.add_argument('--version', action='version', version=config.version)
34     parser.add_argument('--module', required=True,
35                         help='Name of the doc module being parsed')
36     parser.add_argument('--source-dir', action='append', dest='source_dir', default=[])
37     parser.add_argument('--source-suffixes', dest='source_suffixes', default='')
38     parser.add_argument('--ignore-files', dest='ignore_files', default='')
39     parser.add_argument('--output-dir', dest='output_dir', default='')
40     parser.add_argument('--tmpl-dir', dest='tmpl_dir', help="DEPRECATED")
41     parser.add_argument('--main-sgml-file', dest='main_sgml_file', default='')
42     parser.add_argument('--expand-content-files', dest='expand_content_files', default='')
43     group = parser.add_mutually_exclusive_group()
44     group.add_argument('--sgml-mode', action='store_true', default=False, dest='sgml_mode')
45     group.add_argument('--xml-mode', action='store_true', default=False, dest='xml_mode')
46     parser.add_argument('--default-stability', dest='default_stability',
47                         choices=['', 'Stable', 'Private', 'Unstable'], default='')
48     parser.add_argument('--default-includes', dest='default_includes', default='')
49     parser.add_argument('--output-format', default='xml')  # MUST be 'xml', deprecate?
50     parser.add_argument('--name-space', dest='name_space', default='')
51     parser.add_argument('--outputallsymbols', default=False, action='store_true')
52     parser.add_argument('--outputsymbolswithoutsince', default=False, action='store_true')
54     options = parser.parse_args()
56     if options.output_format != "xml":
57         sys.exit('Invalid format "%s" passed to --output.format' % options.output_format)
59     common.setup_logging()
61     mkdb.Run(options)