From: Dieter Verfaillie Date: Mon, 5 Sep 2011 19:54:18 +0000 (+0200) Subject: Windows port: g-ir-scanner: Accept -m flags X-Git-Tag: GOBJECT_INTROSPECTION_1_30_0~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=390c8b473a6098e06bbc9fc7d81a9f7153844d83;p=platform%2Fupstream%2Fgobject-introspection.git Windows port: g-ir-scanner: Accept -m flags Some pkgconfig files contain these flags on Windows, for example gtk+-3.0.pc has -mms-bitfields in it's Cflags. Nothing is done yet with these though, we only accept these flags for now... https://bugzilla.gnome.org/show_bug.cgi?id=620566 --- diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py index 3c1386a9..6dc56ef0 100755 --- a/giscanner/scannermain.py +++ b/giscanner/scannermain.py @@ -56,6 +56,14 @@ def get_preprocessor_option_group(parser): group.add_option("-p", dest="", help="Ignored") return group +def get_windows_option_group(parser): + group = optparse.OptionGroup(parser, "Machine Dependent Options") + group.add_option("-m", help="some machine dependent option", + action="append", dest='m_option', + default=[]) + + return group + def _get_option_parser(): parser = optparse.OptionParser('%prog [options] sources') parser.add_option('', "--quiet", @@ -151,6 +159,10 @@ match the namespace prefix.""") group = get_preprocessor_option_group(parser) parser.add_option_group(group) + if os.environ.get('MSYSTEM') == 'MINGW32': + group = get_windows_option_group(parser) + parser.add_option_group(group) + # Private options parser.add_option('', "--generate-typelib-tests", action="store", dest="test_codegen", default=None,