From 10604d850510e46b2ee625548abe5eb9a1172a0d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 21 Jul 2015 09:39:57 +0200 Subject: Add alias{} target type, use as base for dir{} --- build/target | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'build/target') diff --git a/build/target b/build/target index d164f72..e07f6e0 100644 --- a/build/target +++ b/build/target @@ -889,11 +889,10 @@ namespace build static const target_type static_type; }; - // Directory alias/action target. Note that it is not mtime-based. - // Rather it is meant to represent a group of targets. For actual - // filesystem directory (creation), see fsdir. + // Alias target. It represents a list of targets (its prerequisites) + // as a single "name". // - class dir: public target + class alias: public target { public: using target::target; @@ -903,6 +902,20 @@ namespace build static const target_type static_type; }; + // Directory target. Note that this is not a filesystem directory + // but rather an alias target with the directory name. For actual + // filesystem directory (creation), see fsdir. + // + class dir: public alias + { + public: + using alias::alias; + + public: + virtual const target_type& type () const {return static_type;} + static const target_type static_type; + }; + // While a filesystem directory is mtime-based, the semantics is // not very useful in our case. In particular, if another target // depends on fsdir{}, then all that's desired is the creation of -- cgit v1.1