diff options
author | Corentin Noël <tintou@noel.tf> | 2023-04-29 23:18:31 +0200 |
---|---|---|
committer | Corentin Noël <tintou@noel.tf> | 2023-04-29 23:25:36 +0200 |
commit | b99435279a281f2c541100b693c96e67d6c1bd62 (patch) | |
tree | 804748ffd7a2e609689000996144c84f713a241f /giscanner/scannermain.py | |
parent | f9b412e96d5618894158284289cf2a3fe6e7cbfd (diff) | |
download | gobject-introspection-b99435279a281f2c541100b693c96e67d6c1bd62.tar.gz |
Allow to specify the format of the documentationtintou/doc-format
Helps the consumers of the documentation to assume that the documentation is
using gtk-doc format or gi-docgen.
Diffstat (limited to 'giscanner/scannermain.py')
-rw-r--r-- | giscanner/scannermain.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py index 1d39ab84..186bfd07 100644 --- a/giscanner/scannermain.py +++ b/giscanner/scannermain.py @@ -220,6 +220,10 @@ match the namespace prefix.""") parser.add_option("", "--compiler", action="store", dest="compiler", default=None, help="the C compiler to use internally") + parser.add_option("", "--doc-format", + action="store", dest="doc_format", + help=("name of the documentation format used in the project, " + "should be on of gtk-doc or gi-docgen")) group = get_preprocessor_option_group(parser) parser.add_option_group(group) @@ -580,6 +584,9 @@ def scanner_main(args): or options.header_only): _error("Must specify --program or --library") + if options.doc_format and options.doc_format != 'gtk-doc' and options.doc_format != 'gi-docgen': + _error("Unknown doc-type: %s" % (options.doc_format, )) + namespace = create_namespace(options) logger = message.MessageLogger.get(namespace=namespace) if options.warn_all: @@ -638,6 +645,7 @@ def scanner_main(args): transformer.namespace.c_includes = options.c_includes transformer.namespace.exported_packages = exported_packages + transformer.namespace.doc_format = options.doc_format sources_top_dirs = get_source_root_dirs(options, filenames) writer = Writer(transformer.namespace, sources_top_dirs) |