From 390c8b473a6098e06bbc9fc7d81a9f7153844d83 Mon Sep 17 00:00:00 2001 From: Dieter Verfaillie Date: Mon, 5 Sep 2011 21:54:18 +0200 Subject: 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 --- giscanner/scannermain.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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, -- cgit v1.2.1