MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / escape_for_makefile

Function escape_for_makefile

tools/file_packager.py:613–618  ·  view source on GitHub ↗
(fpath)

Source from the content-addressed store, hash-verified

611
612
613def 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
621def generate_preload_js(data_target, data_files, metadata, js_file):

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected