X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0cbc1d02511500b8499a11939ef0c59309937fca..e7bdf0ac8d2f095062b054e1adffd283c1d507a4:/docs/doxygen/scripts/make_bindings.py?ds=sidebyside

diff --git a/docs/doxygen/scripts/make_bindings.py b/docs/doxygen/scripts/make_bindings.py
index e3e83047c1..5411d07b56 100644
--- a/docs/doxygen/scripts/make_bindings.py
+++ b/docs/doxygen/scripts/make_bindings.py
@@ -1,34 +1,37 @@
-import doxymlparser
 import optparse
 import sys
 import os
 import string
+import types
+
+import c_tools
+import doxymlparser
 import sip_tools
 import swig_tools
-import types
 
 from common import *
 
-option_dict = { 
-            "output_dir"     : ("output", "Directory to output bindings to"),
-            "sip"            : (True, "Produce SIP bindings"),
-            "swig"           : (True, "Produce SWIG bindings."),
-            
-}
-
-parser = optparse.OptionParser(usage="usage: %prog <doxyml files to parse>\n" , version="%prog 1.0")
-
-for opt in option_dict:
-    default = option_dict[opt][0]
+if __name__ == "__main__":
+    option_dict = { 
+                "output_dir"     : ("output", "Directory to output bindings to"),
+                "sip"            : (True, "Produce SIP bindings"),
+                "swig"           : (True, "Produce SWIG bindings."),
+                "c"              : (True, "Produce C wrappers."),
+                
+    }
     
-    action = "store"
-    if type(default) == types.BooleanType:
-        action = "store_true"
-    parser.add_option("--" + opt, default=default, action=action, dest=opt, help=option_dict[opt][1])
-
-options, arguments = parser.parse_args()
+    parser = optparse.OptionParser(usage="usage: %prog <doxyml files to parse>\n" , version="%prog 1.0")
+    
+    for opt in option_dict:
+        default = option_dict[opt][0]
+        
+        action = "store"
+        if type(default) == types.BooleanType:
+            action = "store_true"
+        parser.add_option("--" + opt, default=default, action=action, dest=opt, help=option_dict[opt][1])
+    
+    options, arguments = parser.parse_args()
 
-if __name__ == "__main__":
     if len(arguments) < 1:
         parser.print_usage()
         sys.exit(1)
@@ -44,3 +47,7 @@ if __name__ == "__main__":
     if options.swig:
         builder = swig_tools.SWIGBuilder(doxyparse, options.output_dir)
         builder.make_bindings()
+        
+    if options.c:
+        builder = c_tools.CBuilder(doxyparse, options.output_dir)
+        builder.make_bindings()