--- /dev/null
+#ifndef SOURCEGENERATOR_H_
+#define SOURCEGENERATOR_H_
+
+#include <msp/datafile/objectloader.h>
+#include "sourcepackage.h"
+#include "tool.h"
+
+class SourceGenerator: public Tool
+{
+public:
+ class Loader: public Msp::DataFile::ObjectLoader<SourceGenerator>
+ {
+ public:
+ Loader(SourceGenerator &);
+
+ private:
+ void command(const std::string &);
+ void in_suffix(const std::string &);
+ void out_suffix(const std::string &);
+ };
+
+private:
+ const SourcePackage &package;
+ std::list<std::string> out_suffixes;
+
+public:
+ SourceGenerator(Builder &, const SourcePackage &, const std::string &);
+
+ virtual Target *create_source(const Component &, const Msp::FS::Path &) const;
+ virtual Target *create_target(const std::list<Target *> &, const std::string &);
+
+private:
+ virtual void do_prepare();
+
+public:
+ virtual Task *run(const Target &) const;
+};
+
+#endif