From 35bd274ee7ac9611b9c8354f74bba2eb44c4987a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 6 Sep 2016 13:37:52 +0200 Subject: Ignore instead of overriding header prefix (now more specific -I's come first) --- build2/cc/compile.cxx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/build2/cc/compile.cxx b/build2/cc/compile.cxx index 6fd6f16..2dc2a28 100644 --- a/build2/cc/compile.cxx +++ b/build2/cc/compile.cxx @@ -488,16 +488,18 @@ namespace build2 { if (j->second != d) { - // We used to reject duplicates but it seems this can - // be reasonably expected to work according to the order - // of the -I options. + // We used to reject duplicates but it seems this can be + // reasonably expected to work according to the order of the -I + // options. + // + // Seeing that we normally have more "specific" -I paths first, + // (so that we don't pick up installed headers, etc), we ignore + // it. // if (verb >= 4) - trace << "overriding dependency prefix '" << p << "'\n" - << " old mapping to " << j->second << "\n" - << " new mapping to " << d; - - j->second = d; + trace << "ignoring dependency prefix '" << p << "'\n" + << " existing mapping to " << j->second << "\n" + << " another mapping to " << d; } } else -- cgit v1.1