Fix ninja not reloading buildfiles on regen

This commit is contained in:
Justin C. Miller
2019-02-03 00:20:01 -08:00
parent c4dc52c06c
commit 237c242f96
2 changed files with 7 additions and 3 deletions

View File

@@ -144,9 +144,13 @@ def main(buildroot):
buildfile=buildfile,
version=git_version))
buildfile = join(buildroot, "build.ninja")
# Top level buildfile cannot use an absolute path or ninja won't
# reload itself properly on changes.
# See: https://github.com/ninja-build/ninja/issues/1240
buildfile = "build.ninja"
buildfiles.append(buildfile)
with open(buildfile, 'w') as out:
with open(join(buildroot, buildfile), 'w') as out:
#print("Generating main build.ninja")
template = env.get_template('build.ninja.j2')
templates.add(template.filename)

View File

@@ -103,7 +103,7 @@ rule makefat
description = Creating $name
command = $
cp $srcroot/assets/diskbase.img $out; $
mcopy -s -D o -i $out@@1024K $builddir/fatroot/* ::/
mcopy -s -D o -i $out@@1M $builddir/fatroot/* ::/
{% for target in targets %}
subninja {{ target }}/target.ninja