Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, name):
import ninja
if not os.path.exists(BUILD_DIR):
os.mkdir(BUILD_DIR)
self.ninja_program = os.path.join(ninja.BIN_DIR, 'ninja')
self.name = name
self.filename = os.path.join(BUILD_DIR, 'build.{}.ninja'.format(name))
self.writer = ninja.Writer(open(self.filename, 'w'))
self.writer.rule('do_cmd', '$cmd')
self.writer.rule('compile', '$cmd')
self.compdb_targets = []
def __init__(self, name):
import ninja
if not os.path.exists(BUILD_DIR):
os.mkdir(BUILD_DIR)
self.ninja_program = os.path.join(ninja.BIN_DIR, 'ninja')
self.name = name
self.filename = os.path.join(BUILD_DIR, 'build.{}.ninja'.format(name))
self.writer = ninja.Writer(open(self.filename, 'w'))
self.writer.rule('do_cmd', '$cmd')
self.writer.rule('compile', '$cmd')
self.compdb_targets = []
w.build(
"$builddir/genhdr/qstrdefs.generated.h",
"qstr_generate",
"$builddir/genhdr/qstrdefs.preprocessed.h",
)
w.variable("qstr", "$builddir/genhdr/qstrdefs.generated.h")
def build_object(path):
base, ext = os.path.splitext(path)
return "$builddir/%s.o" % base
with open("build_unix_debug.ninja", "w") as of:
writer = ninja.Writer(of, 1024)
common(writer)
qstrings(writer)
micropython(writer)
extmod(writer)
unix(writer)
version(writer)