aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/c
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-08-22 09:43:20 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-08-22 09:43:20 +0200
commit18e079b37794dc97b6c51045476bf43296b56dd3 (patch)
treeb81682b523ab87827bbfa7c9080a9b20dcbbda65 /libbuild2/c
parent1741b21e27945da8c55069fa7cd66e55757be053 (diff)
Add abstract c_inc{} and cxx_inc{} target types
These abstract base target types are meant for deriving additional target types (for example, Qt moc{}) that can be #include'd in C and C++ translation units, respectively. In particular, only such targets will be considered to reverse-lookup extensions to target types (see dyndep_rule::map_extension() for background).
Diffstat (limited to 'libbuild2/c')
-rw-r--r--libbuild2/c/init.cxx3
-rw-r--r--libbuild2/c/target.hxx1
2 files changed, 3 insertions, 1 deletions
diff --git a/libbuild2/c/init.cxx b/libbuild2/c/init.cxx
index c3d8174..1922a99 100644
--- a/libbuild2/c/init.cxx
+++ b/libbuild2/c/init.cxx
@@ -350,7 +350,7 @@ namespace build2
};
// Note that we include S{} here because .S files can include each other.
- // (And maybe from inline assember instrcutions?)
+ // (And maybe from inline assembler instructions?)
//
static const target_type* const inc[] =
{
@@ -358,6 +358,7 @@ namespace build2
&c::static_type,
&m::static_type,
&S::static_type,
+ &c_inc::static_type,
nullptr
};
diff --git a/libbuild2/c/target.hxx b/libbuild2/c/target.hxx
index 39fcf89..c9955e3 100644
--- a/libbuild2/c/target.hxx
+++ b/libbuild2/c/target.hxx
@@ -17,6 +17,7 @@ namespace build2
using cc::c;
using cc::m;
using cc::S;
+ using cc::c_inc;
}
}