Debian Codegraph @

test cases/common/54 custom target source output/generator.py

raw
1 #!/usr/bin/env python3
2
3 import sys, os
4
5 if len(sys.argv) != 2:
6 print(sys.argv[0], '<output dir>')
7
8 odir = sys.argv[1]
9
10 with open(os.path.join(odir, 'mylib.h'), 'w') as f:
11 f.write('int func(void);\n')
12 with open(os.path.join(odir, 'mylib.c'), 'w') as f:
13 f.write('''int func(void) {
14 return 0;
15 }
16 ''')