(fpath)
| 611 | |
| 612 | |
| 613 | def escape_for_makefile(fpath): |
| 614 | # Escapes for CMake's "pathname" grammar as described here: |
| 615 | # https://cmake.org/cmake/help/latest/command/add_custom_command.html#grammar-token-depfile-pathname |
| 616 | # Which is congruent with how Ninja and GNU Make expect characters escaped. |
| 617 | fpath = utils.normalize_path(fpath) |
| 618 | return fpath.replace('$', '$$').replace('#', '\\#').replace(' ', '\\ ') |
| 619 | |
| 620 | |
| 621 | def generate_preload_js(data_target, data_files, metadata, js_file): |