test cases/common/140 custom target multiple outputs/generator.py
raw| 1 | #!/usr/bin/env python3 |
| 2 | |
| 3 | import sys, os |
| 4 | |
| 5 | if len(sys.argv) != 3: |
| 6 | print(sys.argv[0], '<namespace>', '<output dir>') |
| 7 | |
| 8 | name = sys.argv[1] |
| 9 | odir = sys.argv[2] |
| 10 | |
| 11 | with open(os.path.join(odir, name + '.h'), 'w') as f: |
| 12 | f.write('int func();\n') |
| 13 | with open(os.path.join(odir, name + '.sh'), 'w') as f: |
| 14 | f.write('#!/bin/bash') |