test cases/common/14 configure file/generator-deps.py
raw| 1 | #!/usr/bin/env python3 |
| 2 | |
| 3 | import sys, os |
| 4 | from pathlib import Path |
| 5 | |
| 6 | if len(sys.argv) != 3: |
| 7 | print("Wrong amount of parameters.") |
| 8 | |
| 9 | build_dir = Path(os.environ['MESON_BUILD_ROOT']) |
| 10 | subdir = Path(os.environ['MESON_SUBDIR']) |
| 11 | outputf = Path(sys.argv[1]) |
| 12 | |
| 13 | with outputf.open('w') as ofile: |
| 14 | ofile.write("#define ZERO_RESULT 0\n") |
| 15 | |
| 16 | depf = Path(sys.argv[2]) |
| 17 | if not depf.exists(): |
| 18 | with depf.open('w') as ofile: |
| 19 | ofile.write(f"{outputf.name}: depfile\n") |