Update to 2.0.0 tree from current Fremantle build
[opencv] / utils / extract_aliases.py
index 3906f57..edf32d4 100755 (executable)
@@ -13,13 +13,14 @@ EXCLUDE = { }
 
 # force this to be part of cv module
 # otherwise becomes cv.cvmacros
+print "/** This file was automatically generated using util/extract_aliases.py script */"
 print "%module cv"
 print "%pythoncode %{"
 for fn in sys.argv[1:]:
     f = open( fn, "r" )
     in_define = 0
     for l in f.xreadlines():
-        m = re.match( r"^#define\s+((?:CV_|IPL_|cv)\w+)\s+((?:CV|IPL|cv)\w*)$", l )
+        m = re.match( r"^#define\s+((?:CV_|IPL_|cv)\w+)\s+((?:CV|IPL|cv)\w*)\s*$", l )
         if m and not l.endswith( "\\\n" ) and not EXCLUDE.has_key(m.group(1)):
             print "%s=%s" % (m.group(1), m.group(2))
     f.close()