Debian Codegraph @

test cases/common/57 custom header generator/makeheader.py

raw
1 #!/usr/bin/env python3
2
3 # NOTE: this file does not have the executable bit set. This tests that
4 # Meson can automatically parse shebang lines.
5
6 import sys
7
8 template = '#define RET_VAL %s\n'
9 with open(sys.argv[1]) as f:
10 output = template % (f.readline().strip(), )
11 with open(sys.argv[2], 'w', encoding='utf-8') as f:
12 f.write(output)