#!/usr/bin/env python3 # copy_files.py STAMP DEST SRC [SRC ...] # # Copy each SRC next to the built executable (DEST) and touch STAMP so Meson can # track the custom_target. Used to stage the LLDB/Python runtime DLLs beside # hsdbg.exe on Windows, mirroring the old premake postbuild copies. import os import shutil import sys def main(argv): if len(argv) < 3: sys.stderr.write("usage: copy_files.py STAMP DEST SRC [SRC ...]\n") return 1 stamp, dest = argv[1], argv[2] os.makedirs(dest, exist_ok=True) for src in argv[3:]: if os.path.isfile(src): shutil.copy2(src, dest) else: sys.stderr.write(f"warning: {src} not found, skipping\n") with open(stamp, "w") as handle: handle.write("") return 0 if __name__ == "__main__": sys.exit(main(sys.argv))