]> git.tdb.fi Git - builder.git/blobdiff - source/pkgconfiggenerator.h
Refactor InternalTask to take a functor
[builder.git] / source / pkgconfiggenerator.h
index 727b3e29536e0e24c14cb42c054d3d8179e05ca4..0f0886b851aa2583176d1499dcb0100d9a058168 100644 (file)
@@ -1,33 +1,21 @@
 #ifndef PKGCONFIGGENERATOR_H_
 #define PKGCONFIGGENERATOR_H_
 
-#include "internaltask.h"
 #include "tool.h"
 
 class PkgConfigFile;
 
 class PkgConfigGenerator: public Tool
 {
-private:
-       class Worker: public InternalTask::Worker
-       {
-       private:
-               const PkgConfigFile ⌖
-
-       public:
-               Worker(const PkgConfigFile &t): target(t) { }
-
-       private:
-               void main() override;
-
-               std::string prefixify(const Msp::FS::Path &, const Msp::FS::Path &);
-       };
-
 public:
        PkgConfigGenerator(Builder &b): Tool(b, "PCG") { }
 
        Target *create_target(const std::vector<Target *> &, const std::string &) override;
        Task *run(const Target &) const override;
+
+private:
+       static bool _run(const PkgConfigFile &);
+       static std::string prefixify(const Msp::FS::Path &, const Msp::FS::Path &);
 };
 
 #endif