aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/common/54 custom target source output/generator.py
blob: 1bec8e855397f365422a206183a8e76b91da4ad3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
@media only all and (prefers-color-scheme: dark) {
.highlight .hll { background-color: #49483e }
#!/usr/bin/env python3

import sys, os

if len(sys.argv) != 2:
    print(sys.argv[0], '<output dir>')

odir = sys.argv[1]

with open(os.path.join(odir, 'mylib.h'), 'w') as f:
    f.write('int func(void);\n')
with open(os.path.join(odir, 'mylib.c'), 'w') as f:
    f.write('''int func(void) {
    return 0;
}
''')