From 8e904346350cff0453c8bcd524a40a631fc05485 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 9 Jan 2019 13:09:18 +0200 Subject: Tighten cc rules matching Specifically, make sure the rule does not match if there is a c-common prerequisites that it doesn't recognize. --- build2/cc/target.hxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'build2/cc/target.hxx') diff --git a/build2/cc/target.hxx b/build2/cc/target.hxx index 4fb38cb..395c233 100644 --- a/build2/cc/target.hxx +++ b/build2/cc/target.hxx @@ -14,10 +14,10 @@ namespace build2 { namespace cc { - // This is an abstract base target for all c-common source files. We use - // this arrangement in rule matching to detect "unknown" (to this rule) - // source files that it cannot handle but should not ignore either. For - // example, a C link rule that sees a C++ source file. + // This is an abstract base target for all c-common header/source files. + // We use this arrangement during rule matching to detect "unknown" (to + // this rule) source/header files that it cannot handle but should not + // ignore either. For example, a C link rule that sees a C++ source file. // class cc: public file { @@ -32,10 +32,10 @@ namespace build2 // There is hardly a c-family compilation without a C header inclusion. // As a result, this target type is registered for any c-family module. // - class h: public file + class h: public cc { public: - using file::file; + using cc::cc; public: static const target_type static_type; -- cgit v1.1