Commit 53f2d79c authored by Emmanuele Bassi's avatar Emmanuele Bassi

Do not overwrite variables

We're using the same variable for two separate iterations, so we need to
make sure that we're not overwriting its value.
parent 4255b51d
......@@ -211,17 +211,20 @@ def main(args):
use_make = False
use_ninja = False
buildfile_path = None
for name in ['build.ninja']:
buildfile_path = os.path.join(builddir, name)
if os.path.exists(buildfile_path):
file_path = os.path.join(builddir, name)
if os.path.exists(file_path):
buildfile_path = file_path
use_ninja = True
break
for name in ['Makefile', 'makefile', 'GNUmakefile']:
buildfile_path = os.path.join(builddir, name)
if os.path.exists(buildfile_path):
file_path = os.path.join(builddir, name)
if os.path.exists(file_path):
buildfile_path = file_path
use_make = True
break
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment