[gobject-introspection] Windows port: g-ir-scanner: Accept -m flags



commit 390c8b473a6098e06bbc9fc7d81a9f7153844d83
Author: Dieter Verfaillie <dieterv optionexplicit be>
Date:   Mon Sep 5 21:54:18 2011 +0200

    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 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
index 3c1386a..6dc56ef 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,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]