2016-03-07 12:13:24 +01:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
|
|
|
# FIXME: where does the #include "marshalers.h" go?
|
|
|
|
|
|
|
|
import sys, subprocess
|
|
|
|
|
2016-12-20 23:37:24 +01:00
|
|
|
if len(sys.argv) != 3:
|
|
|
|
print('Usage: {0} <listname> <outputfile>')
|
|
|
|
sys.exit(0)
|
2016-03-07 12:13:24 +01:00
|
|
|
|
2016-12-20 23:37:24 +01:00
|
|
|
glib_genmarshal = sys.argv[1]
|
|
|
|
listname = sys.argv[2]
|
|
|
|
outname = sys.argv[3]
|
2016-03-07 12:13:24 +01:00
|
|
|
|
|
|
|
if outname.endswith('.h'):
|
|
|
|
arg = '--header'
|
|
|
|
else:
|
|
|
|
arg = '--body'
|
|
|
|
|
2016-12-20 23:37:24 +01:00
|
|
|
output = subprocess.check_output([glib_genmarshal, '--prefix=test', '--valist-marshallers', arg, listname])
|
2016-03-07 12:13:24 +01:00
|
|
|
open(outname, 'wb').write(output)
|