| #!/usr/bin/env python |
| # Copyright 2018 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import argparse |
| import os |
| import subprocess |
| import sys |
| import pipes |
| |
| |
| def main(): |
| parser = argparse.ArgumentParser("Generate vulkan cts dep file") |
| parser.add_argument("depsfile") |
| parser.add_argument("input_dir") |
| args = parser.parse_args() |
| |
| files = subprocess.check_output([ |
| "find", args.input_dir, "-path", "*/.git", "-prune", "-o", "-type", "f", |
| "-print" |
| ]) |
| file_lines = files.splitlines() |
| |
| with open(args.depsfile, "w") as depsfile: |
| depsfile.write("build-vulkancts/external/vulkancts/modules/vulkan/deqp-vk: ") |
| depsfile.write(" ".join(x.replace(' ', '\\ ') for x in file_lines)) |
| return 0 |
| |
| |
| if __name__ == "__main__": |
| sys.exit(main()) |