From: Mikko Rasa Date: Wed, 30 May 2012 19:12:24 +0000 (+0000) Subject: Rename PkgConfig to PkgConfigFile X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=811a840948aab4e2f4a423d481f076220372a998;p=builder.git Rename PkgConfig to PkgConfigFile --- diff --git a/source/builder.cpp b/source/builder.cpp index 42dc464..b3e0968 100644 --- a/source/builder.cpp +++ b/source/builder.cpp @@ -24,7 +24,7 @@ #include "installedfile.h" #include "misc.h" #include "package.h" -#include "pkgconfig.h" +#include "pkgconfigfile.h" #include "pkgconfiggenerator.h" #include "sharedlibrary.h" #include "sourcepackage.h" @@ -504,7 +504,7 @@ int Builder::create_targets() if(spkg->get_install_flags()&(SourcePackage::LIB|SourcePackage::INCLUDE)) { - PkgConfig *pc = new PkgConfig(*this, *spkg); + PkgConfigFile *pc = new PkgConfigFile(*this, *spkg); install->add_depend(toolchain.get_tool("CP").create_target(*pc)); } } diff --git a/source/installedfile.cpp b/source/installedfile.cpp index 5ed3139..fff8c3b 100644 --- a/source/installedfile.cpp +++ b/source/installedfile.cpp @@ -5,7 +5,6 @@ #include "datafile.h" #include "installedfile.h" #include "package.h" -#include "pkgconfig.h" #include "sharedlibrary.h" #include "staticlibrary.h" diff --git a/source/pkgconfig.cpp b/source/pkgconfig.cpp deleted file mode 100644 index 9c5b720..0000000 --- a/source/pkgconfig.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include "builder.h" -#include "package.h" -#include "pkgconfig.h" - -PkgConfig::PkgConfig(Builder &b, const SourcePackage &p): - FileTarget(b, &p, p.get_source()/(p.get_name()+".pc")) -{ - tool = &builder.get_toolchain().get_tool("PCG"); - - install_location = "lib/pkgconfig"; -} diff --git a/source/pkgconfig.h b/source/pkgconfig.h deleted file mode 100644 index 4b2505d..0000000 --- a/source/pkgconfig.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef PKGCONFIG_H_ -#define PKGCONFIG_H_ - -#include "sourcepackage.h" -#include "filetarget.h" - -/** -Creates a .pc file to enable other packages fetch build options with pkg-config. -*/ -class PkgConfig: public FileTarget -{ -public: - PkgConfig(Builder &, const SourcePackage &); - - virtual const char *get_type() const { return "PkgConfig"; } -}; - -#endif diff --git a/source/pkgconfigfile.cpp b/source/pkgconfigfile.cpp new file mode 100644 index 0000000..45951cc --- /dev/null +++ b/source/pkgconfigfile.cpp @@ -0,0 +1,11 @@ +#include "builder.h" +#include "package.h" +#include "pkgconfigfile.h" + +PkgConfigFile::PkgConfigFile(Builder &b, const SourcePackage &p): + FileTarget(b, &p, p.get_source()/(p.get_name()+".pc")) +{ + tool = &builder.get_toolchain().get_tool("PCG"); + + install_location = "lib/pkgconfig"; +} diff --git a/source/pkgconfigfile.h b/source/pkgconfigfile.h new file mode 100644 index 0000000..1a31c38 --- /dev/null +++ b/source/pkgconfigfile.h @@ -0,0 +1,18 @@ +#ifndef PKGCONFIGFILE_H_ +#define PKGCONFIGFILE_H_ + +#include "sourcepackage.h" +#include "filetarget.h" + +/** +Creates a .pc file to enable other packages fetch build options with pkg-config. +*/ +class PkgConfigFile: public FileTarget +{ +public: + PkgConfigFile(Builder &, const SourcePackage &); + + virtual const char *get_type() const { return "PkgConfig"; } +}; + +#endif diff --git a/source/pkgconfiggenerator.cpp b/source/pkgconfiggenerator.cpp index 91d101d..827f62d 100644 --- a/source/pkgconfiggenerator.cpp +++ b/source/pkgconfiggenerator.cpp @@ -2,7 +2,7 @@ #include #include #include "builder.h" -#include "pkgconfig.h" +#include "pkgconfigfile.h" #include "pkgconfiggenerator.h" using namespace std; @@ -20,13 +20,13 @@ Target *PkgConfigGenerator::create_target(const list &, const string & Task *PkgConfigGenerator::run(const Target &target) const { - const PkgConfig &pkgc = dynamic_cast(target); + const PkgConfigFile &pkgc = dynamic_cast(target); Worker *worker = new Worker(pkgc); return new InternalTask(worker); } -PkgConfigGenerator::Worker::Worker(const PkgConfig &t): +PkgConfigGenerator::Worker::Worker(const PkgConfigFile &t): target(t) { } diff --git a/source/pkgconfiggenerator.h b/source/pkgconfiggenerator.h index 1f0d99a..0d6c092 100644 --- a/source/pkgconfiggenerator.h +++ b/source/pkgconfiggenerator.h @@ -12,10 +12,10 @@ private: class Worker: public InternalTask::Worker { private: - const PkgConfig ⌖ + const PkgConfigFile ⌖ public: - Worker(const PkgConfig &); + Worker(const PkgConfigFile &); private: virtual void main();