#include <string>
#include <vector>
#include <sigc++/signal.h>
+#include <msp/core/noncopyable.h>
#include <msp/time/timestamp.h>
+#include "libbuilder_api.h"
class Builder;
class BuildInfo;
target itself, and will cause the target to be rebuilt if modified. Transitive
dependencies can be used by other targets further down the chain.
*/
-class Target
+class LIBBUILDER_API Target
{
public:
using Dependencies = std::vector<Target *>;
BROKEN
};
+ struct PushPrepare: Msp::NonCopyable
+ {
+ PushPrepare(Target *t) { prepare_stack.push_back(t); }
+ ~PushPrepare() { prepare_stack.pop_back(); }
+ };
+
public:
sigc::signal<void> signal_bubble_rebuild;
sigc::signal<void> signal_modified;
Dependencies side_effects;
Target *primary_target = 0;
+ static std::vector<Target *> prepare_stack;
+
Target(Builder &, const std::string &);
public:
virtual ~Target() { }