X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftarget.h;h=d971a55bbd46f7dd8a444903a3477c69c02a8a2b;hb=0c83b922e56976a30506d9f8d43c9dcd38d573b5;hp=01b115a7a6b5ddf2e008f39299c7c392ae84bcd2;hpb=20994a6f4802f2dbcf01888d0e1996edf554ade5;p=builder.git diff --git a/source/target.h b/source/target.h index 01b115a..d971a55 100644 --- a/source/target.h +++ b/source/target.h @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of builder -Copyright © 2006-2009 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #ifndef TARGET_H_ #define TARGET_H_ @@ -56,7 +49,15 @@ public: dependencies are up-to-date, returns this target. If there are no targets ready to be built (maybe because they are being built right now), returns 0. */ - Target *get_buildable_target(); + virtual Target *get_buildable_target(); + + /** + If this target is a proxy for another (such as Install or Symlink), return + that target. Otherwise, return the target itself. + + Implementors should call the function recursively to find the final target. + */ + virtual Target *get_real_target() { return this; } bool is_buildable() const { return buildable; } bool get_rebuild() const { return rebuild; } @@ -101,6 +102,4 @@ protected: virtual void build_done(); }; -typedef std::map TargetMap; - #endif