using namespace std;
using namespace Msp;
-Analyzer::Analyzer(Builder &b):
- builder(b)
-{ }
-
void Analyzer::analyze()
{
if(mode==RDEPS)
std::map<const Target *, std::set<Target *> > rdepends;
public:
- Analyzer(Builder &);
+ Analyzer(Builder &b): builder(b) { }
void set_mode(Mode m) { mode = m; }
void set_max_depth(unsigned m) { max_depth = m; }
using namespace std;
using namespace Msp;
-AndroidApplicationComponent::AndroidApplicationComponent(SourcePackage &p, const string &n):
- Component(p, n)
-{ }
-
void AndroidApplicationComponent::create_targets() const
{
Builder &builder = package.get_builder();
std::vector<std::string> permissions;
public:
- AndroidApplicationComponent(SourcePackage &, const std::string &);
+ AndroidApplicationComponent(SourcePackage &p, const std::string &n): Component(p, n) { }
void create_targets() const override;
};
using namespace std;
using namespace Msp;
-AndroidManifestGenerator::AndroidManifestGenerator(Builder &b):
- Tool(b, "AMG")
-{ }
-
Target *AndroidManifestGenerator::create_target(const vector<Target *> &, const string &)
{
throw logic_error("not implemented");
}
-AndroidManifestGenerator::Worker::Worker(const AndroidManifestFile &m):
- manifest(m)
-{ }
-
void AndroidManifestGenerator::Worker::main()
{
const Component &comp = *manifest.get_component();
const AndroidManifestFile &manifest;
public:
- Worker(const AndroidManifestFile &);
+ Worker(const AndroidManifestFile &m): manifest(m) { }
private:
void main() override;
};
public:
- AndroidManifestGenerator(Builder &);
+ AndroidManifestGenerator(Builder &b): Tool(b, "AMG") { }
Target *create_target(const std::vector<Target *> &, const std::string &) override;
Task *run(const Target &) const override;
using namespace std;
using namespace Msp;
-Binary::Binary(Builder &b, const FS::Path &p):
- FileTarget(b, p)
-{ }
-
Binary::Binary(Builder &b, const Component &c, const string &p, const vector<ObjectFile *> &objs):
FileTarget(b, c.get_package(), c.get_package().get_output_directory()/p),
objects(objs)
protected:
std::vector<ObjectFile *> objects;
- Binary(Builder &, const Msp::FS::Path &);
+ Binary(Builder &b, const Msp::FS::Path &p): FileTarget(b, p) { }
Binary(Builder &, const Component &, const std::string &, const std::vector<ObjectFile *> &);
public:
using namespace std;
using namespace Msp;
-BinaryComponent::BinaryComponent(SourcePackage &p, const string &n, Type t):
- Component(p, n),
- type(t)
-{ }
-
void BinaryComponent::create_build_info()
{
Component::create_build_info();
std::vector<const Component *> uses;
public:
- BinaryComponent(SourcePackage &, const std::string &, Type);
+ BinaryComponent(SourcePackage &p, const std::string &n, Type t): Component(p, n), type(t) { }
Type get_type() const { return type; }
using namespace std;
using namespace Msp;
-BuildType::BuildType(const string &n):
- name(n)
-{ }
-
-
BuildType::Loader::Loader(BuildType &b):
DataFile::ObjectLoader<BuildType>(b)
{
BuildInfo build_info;
public:
- BuildType(const std::string &);
+ BuildType(const std::string &n): name(n) { }
const std::string &get_name() const { return name; }
const BuildInfo &get_build_info() const { return build_info; }
using namespace std;
using namespace Msp;
-ChainedTask::ChainedTask(Task *t)
-{
- add_task(t);
-}
-
ChainedTask::~ChainedTask()
{
for(Task *t: tasks)
Status final_status = RUNNING;
public:
- ChainedTask(Task *);
+ ChainedTask(Task *t) { add_task(t); }
~ChainedTask();
void add_task(Task *);
using namespace std;
using namespace Msp;
-CompileCommandsGenerator::CompileCommandsGenerator(Builder &b):
- Tool(b, "CCJG")
-{ }
-
Target *CompileCommandsGenerator::create_target(const vector<Target *> &, const string &)
{
throw logic_error("Not implemented");
}
-CompileCommandsGenerator::Worker::Worker(const CompileCommandsJson &t):
- target(t)
-{ }
-
void CompileCommandsGenerator::Worker::main()
{
Builder &builder = target.get_package()->get_builder();
const CompileCommandsJson ⌖
public:
- Worker(const CompileCommandsJson &);
+ Worker(const CompileCommandsJson &t): target(t) { }
private:
void main() override;
};
public:
- CompileCommandsGenerator(Builder &);
+ CompileCommandsGenerator(Builder &b): Tool(b, "CCJG") { }
Target *create_target(const std::vector<Target *> &, const std::string &) override;
Task *run(const Target &) const override;
using namespace std;
using namespace Msp;
-Component::Component(SourcePackage &p, const string &n):
- package(p),
- name(n)
-{ }
-
void Component::prepare()
{
for(Package *r: requires)
InstallMap install_map;
std::vector<std::string> problems;
- Component(SourcePackage &, const std::string &);
+ Component(SourcePackage &p, const std::string &n): package(p), name(n) { }
public:
virtual ~Component() { }
using namespace std;
using namespace Msp;
-Config::Config(SourcePackage &p):
- package(p)
-{ }
-
const Config::Option &Config::add_option(const Feature &f)
{
Option opt(f);
mutable bool changed = false;
public:
- Config(SourcePackage &);
+ Config(SourcePackage &p): package(p) { }
/** Adds a configuration option based on a feature. */
const Option &add_option(const Feature &);
using namespace std;
using namespace Msp;
-Copy::Copy(Builder &b):
- Tool(b, "CP")
-{ }
-
Target *Copy::create_target(const vector<Target *> &sources, const string &arg)
{
FileTarget &file_tgt = dynamic_cast<FileTarget &>(*sources.front());
}
-Copy::Worker::Worker(const InstalledFile &t):
- target(t)
-{ }
-
void Copy::Worker::main()
{
const FileTarget &source = target.get_source();
const InstalledFile ⌖
public:
- Worker(const InstalledFile &);
+ Worker(const InstalledFile &t): target(t) { }
private:
void main() override;
};
public:
- Copy(Builder &);
+ Copy(Builder &b): Tool(b, "CP") { }
Target *create_target(const std::vector<Target *> &, const std::string &) override;
Task *run(const Target &) const override;
using namespace std;
using namespace Msp;
-CSourceFile::CSourceFile(Builder &b, const FS::Path &p):
- SourceFile(b, p)
-{ }
-
CSourceFile::CSourceFile(Builder &b, const Component &c, const FS::Path &p):
SourceFile(b, c, p)
{
std::vector<std::string> includes;
public:
- CSourceFile(Builder &, const Msp::FS::Path &);
+ CSourceFile(Builder &b, const Msp::FS::Path &p): SourceFile(b, p) { }
CSourceFile(Builder &, const Component &, const Msp::FS::Path &);
const char *get_type() const override { return "CSourceFile"; }
+++ /dev/null
-#include "datasourcefile.h"
-
-using namespace Msp;
-
-DataSourceFile::DataSourceFile(Builder &b, const FS::Path &p):
- SourceFile(b, p)
-{ }
-
-DataSourceFile::DataSourceFile(Builder &b, const Component &c, const FS::Path &p):
- SourceFile(b, c, p)
-{ }
class DataSourceFile: public SourceFile
{
public:
- DataSourceFile(Builder &, const Msp::FS::Path &);
- DataSourceFile(Builder &, const Component &, const Msp::FS::Path &);
+ DataSourceFile(Builder &b, const Msp::FS::Path &p): SourceFile(b, p) { }
+ DataSourceFile(Builder &b, const Component &c, const Msp::FS::Path &p): SourceFile(b, c, p) { }
const char *get_type() const override { return "DataSourceFile"; }
};
using namespace std;
using namespace Msp;
-Executable::Executable(Builder &b, const FS::Path &p):
- Binary(b, p)
-{ }
-
Executable::Executable(Builder &b, const Component &c, const vector<ObjectFile *> &objs):
Binary(b, c, b.get_current_arch().create_filename<Executable>(c.get_name()), objs)
{
class Executable: public Binary
{
public:
- Executable(Builder &, const Msp::FS::Path &);
+ Executable(Builder &b, const Msp::FS::Path &p): Binary(b, p) { }
Executable(Builder &, const Component &, const std::vector<ObjectFile *> &);
const char *get_type() const override { return "Executable"; }
using namespace std;
using namespace Msp;
-Feature::Feature(const string &n):
- name(n)
-{ }
-
-
Feature::Loader::Loader(Feature &f):
Msp::DataFile::ObjectLoader<Feature>(f)
{
std::vector<std::string> choices;
bool exported = false;
- Feature(const std::string &);
+ Feature(const std::string &n): name(n) { }
};
#endif
using namespace std;
using namespace Msp;
-FileTarget::FileTarget(Builder &b, const FS::Path &a):
- FileTarget(b, 0, a)
-{ }
-
-FileTarget::FileTarget(Builder &b, const SourcePackage &p, const FS::Path &a):
- FileTarget(b, &p, a)
-{ }
-
FileTarget::FileTarget(Builder &b, const SourcePackage *p, const FS::Path &a):
Target(b, generate_name(b, p, a)),
path(a)
bool nested_build_sig = false;
bool arch_in_build_sig = false;
- FileTarget(Builder &, const Msp::FS::Path &);
- FileTarget(Builder &, const SourcePackage &, const Msp::FS::Path &);
+ FileTarget(Builder &b, const Msp::FS::Path &a): FileTarget(b, 0, a) { }
+ FileTarget(Builder &b, const SourcePackage &p, const Msp::FS::Path &a): FileTarget(b, &p, a) { }
private:
FileTarget(Builder &, const SourcePackage *, const Msp::FS::Path &);
void stat();
using namespace std;
using namespace Msp;
-ImportLibrary::ImportLibrary(Builder &b, const FS::Path &p):
- FileTarget(b, p)
-{ }
-
ImportLibrary::ImportLibrary(Builder &b, const Component &c, SharedLibrary &sl, ExportDefinitions &exp):
FileTarget(b, c.get_package(), c.get_package().get_output_directory()/generate_filename(c, sl)),
shared_lib(&sl)
SharedLibrary *shared_lib = 0;
public:
- ImportLibrary(Builder &, const Msp::FS::Path &);
+ ImportLibrary(Builder &b, const Msp::FS::Path &p): FileTarget(b, p) { }
ImportLibrary(Builder &, const Component &, SharedLibrary &, ExportDefinitions &);
private:
static std::string generate_filename(const Component &, const SharedLibrary &);
using namespace std;
using namespace Msp;
-InstallComponent::InstallComponent(SourcePackage &p, const string &n):
- Component(p, n)
-{ }
-
void InstallComponent::create_targets() const
{
Builder &builder = package.get_builder();
class InstallComponent: public Component
{
public:
- InstallComponent(SourcePackage &, const std::string &);
+ InstallComponent(SourcePackage &p, const std::string &n): Component(p, n) { }
void create_targets() const override;
};
#include "internaltask.h"
-InternalTask::InternalTask(Worker *w):
- worker(w)
-{ }
-
InternalTask::~InternalTask()
{
worker->join();
Worker *worker;
public:
- InternalTask(Worker *);
+ InternalTask(Worker *w): worker(w) { }
~InternalTask();
std::string get_command() const override { return "<internal>"; }
using namespace std;
using namespace Msp;
-ObjCSourceFile::ObjCSourceFile(Builder &b, const FS::Path &p):
- CSourceFile(b, p)
-{ }
-
-ObjCSourceFile::ObjCSourceFile(Builder &b, const Component &c, const FS::Path &p):
- CSourceFile(b, c, p)
-{ }
-
void ObjCSourceFile::parse_includes(IO::Base &in)
{
static Regex r_include("^[ \t]*#(include|import)[ \t]+([\"<].*)[\">]");
class ObjCSourceFile: public CSourceFile
{
public:
- ObjCSourceFile(Builder &, const Msp::FS::Path &);
- ObjCSourceFile(Builder &, const Component &, const Msp::FS::Path &);
+ using CSourceFile::CSourceFile;
const char *get_type() const override { return "ObjCSourceFile"; }
using namespace std;
using namespace Msp;
-PackageManager::PackageManager(Builder &b):
- builder(b)
-{ }
-
PackageManager::~PackageManager()
{
for(const auto &kvp: packages)
bool env_set = false;
public:
- PackageManager(Builder &);
+ PackageManager(Builder &b): builder(b) { }
~PackageManager();
/// Adds a location to look for source packages from.
using namespace std;
using namespace Msp;
-PkgConfigGenerator::PkgConfigGenerator(Builder &b):
- Tool(b, "PCG")
-{
-}
-
Target *PkgConfigGenerator::create_target(const vector<Target *> &, const string &)
{
throw logic_error("Not implemented");
}
-PkgConfigGenerator::Worker::Worker(const PkgConfigFile &t):
- target(t)
-{ }
-
void PkgConfigGenerator::Worker::main()
{
Builder &builder = target.get_package()->get_builder();
const PkgConfigFile ⌖
public:
- Worker(const PkgConfigFile &);
+ Worker(const PkgConfigFile &t): target(t) { }
private:
void main() override;
};
public:
- PkgConfigGenerator(Builder &);
+ PkgConfigGenerator(Builder &b): Tool(b, "PCG") { }
Target *create_target(const std::vector<Target *> &, const std::string &) override;
Task *run(const Target &) const override;
#include "sourcefile.h"
#include "sourcepackage.h"
-SourceFile::SourceFile(Builder &b, const Msp::FS::Path &p):
- FileTarget(b, p)
-{ }
-
SourceFile::SourceFile(Builder &b, const Component &c, const Msp::FS::Path &p):
FileTarget(b, c.get_package(), p)
{
class SourceFile: public FileTarget
{
protected:
- SourceFile(Builder &, const Msp::FS::Path &);
+ SourceFile(Builder &b, const Msp::FS::Path &p): FileTarget(b, p) { }
SourceFile(Builder &, const Component &, const Msp::FS::Path &);
};
using namespace std;
using namespace Msp;
-StaticLibrary::StaticLibrary(Builder &b, const FS::Path &p):
- FileTarget(b, p)
-{ }
-
StaticLibrary::StaticLibrary(Builder &b, const Component &c, const vector<ObjectFile *> &objs):
FileTarget(b, c.get_package(), c.get_package().get_output_directory()/generate_filename(c))
{
BuildInfo build_info;
public:
- StaticLibrary(Builder &, const Msp::FS::Path &);
+ StaticLibrary(Builder &b, const Msp::FS::Path &p): FileTarget(b, p) { }
StaticLibrary(Builder &, const Component &, const std::vector<ObjectFile *> &);
private:
static std::string generate_filename(const Component &);
+++ /dev/null
-#include "templatefile.h"
-
-using namespace Msp;
-
-TemplateFile::TemplateFile(Builder &b, const Component &c, const FS::Path &p):
- SourceFile(b, c, p)
-{ }
class TemplateFile: public SourceFile
{
public:
- TemplateFile(Builder &, const Component &, const Msp::FS::Path &);
+ TemplateFile(Builder &b, const Component &c, const Msp::FS::Path &p): SourceFile(b, c, p) { }
const char *get_type() const override { return "TemplateFile"; }
};
using namespace std;
using namespace Msp;
-Tool::Tool(Builder &b, const string &t):
- Tool(b, 0, t)
-{ }
-
-Tool::Tool(Builder &b, const Architecture &a, const string &t):
- Tool(b, &a, t)
-{ }
-
-Tool::Tool(Builder &b, const Architecture *a, const string &t):
- builder(b),
- architecture(a),
- tag(t)
-{ }
-
void Tool::set_command(const string &cmd, bool cross)
{
if(cmd.empty())
}
-SubTool::SubTool(Tool &p):
- Tool(p),
- parent(p)
-{ }
-
Target *SubTool::create_source(const Component &c, const FS::Path &p) const
{
return parent.create_source(c, p);
bool prepared = false;
std::vector<std::string> problems;
- Tool(Builder &, const std::string &);
- Tool(Builder &, const Architecture &, const std::string &);
+ Tool(Builder &b, const std::string &t): Tool(b, 0, t) { }
+ Tool(Builder &b, const Architecture &a, const std::string &t): Tool(b, &a, t) { }
private:
- Tool(Builder &, const Architecture *, const std::string &);
+ Tool(Builder &b, const Architecture *a, const std::string &t): builder(b), architecture(a), tag(t) { }
public:
virtual ~Tool() { }
protected:
Tool &parent;
- SubTool(Tool &);
+ SubTool(Tool &t): Tool(t), parent(t) { }
public:
Target *create_source(const Component &, const Msp::FS::Path &) const override;
using namespace std;
using namespace Msp;
-VcxProjectGenerator::VcxProjectGenerator(Builder &b):
- Tool(b, "VCXG")
-{ }
-
Target *VcxProjectGenerator::create_target(const vector<Target *> &, const string &)
{
throw logic_error("Not implemented");
}
-VcxProjectGenerator::Worker::Worker(const VcxProjectFile &t):
- target(t)
-{ }
-
void VcxProjectGenerator::Worker::main()
{
const SourcePackage &spkg = *target.get_package();
const VcxProjectFile ⌖
public:
- Worker(const VcxProjectFile &);
+ Worker(const VcxProjectFile &t): target(t) { }
private:
void main() override;
};
public:
- VcxProjectGenerator(Builder &);
+ VcxProjectGenerator(Builder &b): Tool(b, "VCXG") { }
Target *create_target(const std::vector<Target *> &, const std::string &) override;
Task *run(const Target &) const override;
using namespace std;
using namespace Msp;
-VirtualFileSystem::VirtualFileSystem(Builder &b):
- builder(b)
-{
-}
-
FileTarget *VirtualFileSystem::get_target(const FS::Path &p) const
{
auto i = targets.find(p.str());
SearchPath sys_bin_path;
public:
- VirtualFileSystem(Builder &);
+ VirtualFileSystem(Builder &b): builder(b) { }
/** Gets an existing target associated with a path. If no target has claimed
that path, 0 is returned. */
using namespace std;
using namespace Msp;
-VirtualTarget::VirtualTarget(Builder &b, const string &n):
- Target(b, n)
-{ }
-
void VirtualTarget::check_rebuild()
{
// Virtual targets are only rebuilt if their dependencies need rebuilding.
class VirtualTarget: public Target
{
public:
- VirtualTarget(Builder &, const std::string &);
+ VirtualTarget(Builder &b, const std::string &n): Target(b, n) { }
const char *get_type() const override { return "VirtualTarget"; }
private:
using namespace std;
using namespace Msp;
-VsSolutionGenerator::VsSolutionGenerator(Builder &b):
- Tool(b, "VSSG")
-{ }
-
Target *VsSolutionGenerator::create_target(const vector<Target *> &, const string &)
{
throw logic_error("Not implemented");
}
-VsSolutionGenerator::Worker::Worker(const VsSolutionFile &t):
- target(t)
-{ }
-
void VsSolutionGenerator::Worker::main()
{
const SourcePackage &spkg = *target.get_package();
const VsSolutionFile ⌖
public:
- Worker(const VsSolutionFile &);
+ Worker(const VsSolutionFile &t): target(t) { }
private:
void main() override;
};
public:
- VsSolutionGenerator(Builder &);
+ VsSolutionGenerator(Builder &b): Tool(b, "VSSG") { }
Target *create_target(const std::vector<Target *> &, const std::string &) override;
Task *run(const Target &) const override;