diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-11-14 13:08:29 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-11-14 13:08:29 +0200 |
commit | b611e797ad9db9794f4d151f454fa731d12b0bd3 (patch) | |
tree | b202ef1d894a313fb791d5f0af254f67d2ae84b7 /build2/filesystem.cxx | |
parent | 6c3d3f62f8560cbb8d1e983a8dd8cc98266bfe37 (diff) |
Fallback to loading outer buildfile if there isn't one in src_base
This covers the case where the target is defined in the outer buildfile which
is common with non-intrusive project conversions where everything is built
from a single root buildfile.
Diffstat (limited to 'build2/filesystem.cxx')
-rw-r--r-- | build2/filesystem.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/build2/filesystem.cxx b/build2/filesystem.cxx index 8b4e3ec..183c3da 100644 --- a/build2/filesystem.cxx +++ b/build2/filesystem.cxx @@ -190,7 +190,7 @@ namespace build2 } } - const path buildignore (".buildignore"); + const path buildignore_file (".buildignore"); fs_status<mkdir_status> mkdir_buildignore (const dir_path& d, uint16_t verbosity) @@ -200,7 +200,7 @@ namespace build2 // Create the .buildignore file if the directory was created (and so is // empty) or the file doesn't exist. // - path p (d / buildignore); + path p (d / buildignore_file); if (r || !exists (p)) touch (p, true /* create */, verbosity); @@ -217,7 +217,8 @@ namespace build2 // The .buildignore filesystem entry should be of the regular file // type. // - if (de.path () != buildignore || de.ltype () != entry_type::regular) + if (de.path () != buildignore_file || + de.ltype () != entry_type::regular) return false; } } @@ -238,7 +239,7 @@ namespace build2 // first check that the directory is otherwise empty and doesn't contain // the working directory. // - path p (d / buildignore); + path p (d / buildignore_file); if (exists (p) && empty_buildignore (d) && !work.sub (d)) rmfile (p, verbosity); |