From b611e797ad9db9794f4d151f454fa731d12b0bd3 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 14 Nov 2018 13:08:29 +0200 Subject: 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. --- build2/filesystem.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'build2/filesystem.cxx') 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_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); -- cgit v1.1