summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2009-02-19 17:52:22 -0500
committerColin Walters <walters@verbum.org>2009-02-20 09:10:46 -0500
commitff4628ced457a5460f854abb8cdf923cd67c4e6e (patch)
treea9ea00be6333511b7ea1232b039523731f1fe0b8 /tools
parentc86b12154bda14294dddf58bf3026c487566e3af (diff)
Bug 572423 - Support --c-include argument for specifying C headers
This option is for specifying inside the .gir what C header files should be included by C consumers (as opposed to parsed by the scanner).
Diffstat (limited to 'tools')
-rwxr-xr-xtools/g-ir-scanner5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/g-ir-scanner b/tools/g-ir-scanner
index f53f7fc..8205828 100755
--- a/tools/g-ir-scanner
+++ b/tools/g-ir-scanner
@@ -111,6 +111,9 @@ def _get_option_parser():
parser.add_option("", "--xpath-assertions",
action="store", dest="xpath_assertions",
help="Use given file to create assertions on GIR content")
+ parser.add_option("", "--c-include",
+ action="append", dest="c_includes", default=[],
+ help="headers which should be included in C programs")
group = optparse.OptionGroup(parser, "Preprocessor options")
group.add_option("-I", help="Pre-processor include file",
@@ -345,7 +348,7 @@ def main(args):
# Write out AST
writer = Writer(namespace, libraries, transformer.get_includes(),
- options.packages)
+ options.packages, options.c_includes)
data = writer.get_xml()
if options.output:
fd = open(options.output, "w")