From 0db17bfec8b3b6c436f3c9c346d17d98458c3654 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 3 Aug 2015 13:10:28 +0200 Subject: match_only and dependents count rework, part 1 --- build/cxx/compile.cxx | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'build/cxx') diff --git a/build/cxx/compile.cxx b/build/cxx/compile.cxx index d89aaac..48d2240 100644 --- a/build/cxx/compile.cxx +++ b/build/cxx/compile.cxx @@ -113,17 +113,32 @@ namespace build // match() in order to get options (if any, they would // be set by search_library()). // + // @@ What if this is an installed import with an export + // stub? How will such a stub capture prerequsite libs? + // Probably as imported prerequisites, e.g., %lib{z}, not + // as -lz in .libs variable. + // + // In fact, even if we tried match() on lib{}, nothing + // would have matched since that lib{} is out of any + // project and is not a file (which is the case for + // liba/libso). So probably the importing code would + // have to take care of importing all the prerequisite + // libraries. It does make sense since we don't really + // want to match a rule to an installed library. + // if (link::search_library (lib_paths, p.prerequisite) != nullptr) continue; } target& pt (p.search ()); - // @@ The fact that we match but never execute messes up - // the dependents count. This is a workaround, not a - // solution. - // - build::match (a, pt); + if (p.is_a ()) //@@ TMP + build::match_only (a, pt); + else + { + build::match (a, pt); + pt.dependents--; + } } continue; -- cgit v1.1