From 811a840948aab4e2f4a423d481f076220372a998 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 30 May 2012 19:12:24 +0000 Subject: [PATCH] Rename PkgConfig to PkgConfigFile --- source/builder.cpp | 4 ++-- source/installedfile.cpp | 1 - source/{pkgconfig.cpp => pkgconfigfile.cpp} | 4 ++-- source/{pkgconfig.h => pkgconfigfile.h} | 8 ++++---- source/pkgconfiggenerator.cpp | 6 +++--- source/pkgconfiggenerator.h | 4 ++-- 6 files changed, 13 insertions(+), 14 deletions(-) rename source/{pkgconfig.cpp => pkgconfigfile.cpp} (67%) rename source/{pkgconfig.h => pkgconfigfile.h} (61%) 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/pkgconfigfile.cpp similarity index 67% rename from source/pkgconfig.cpp rename to source/pkgconfigfile.cpp index 9c5b720..45951cc 100644 --- a/source/pkgconfig.cpp +++ b/source/pkgconfigfile.cpp @@ -1,8 +1,8 @@ #include "builder.h" #include "package.h" -#include "pkgconfig.h" +#include "pkgconfigfile.h" -PkgConfig::PkgConfig(Builder &b, const SourcePackage &p): +PkgConfigFile::PkgConfigFile(Builder &b, const SourcePackage &p): FileTarget(b, &p, p.get_source()/(p.get_name()+".pc")) { tool = &builder.get_toolchain().get_tool("PCG"); diff --git a/source/pkgconfig.h b/source/pkgconfigfile.h similarity index 61% rename from source/pkgconfig.h rename to source/pkgconfigfile.h index 4b2505d..1a31c38 100644 --- a/source/pkgconfig.h +++ b/source/pkgconfigfile.h @@ -1,5 +1,5 @@ -#ifndef PKGCONFIG_H_ -#define PKGCONFIG_H_ +#ifndef PKGCONFIGFILE_H_ +#define PKGCONFIGFILE_H_ #include "sourcepackage.h" #include "filetarget.h" @@ -7,10 +7,10 @@ /** Creates a .pc file to enable other packages fetch build options with pkg-config. */ -class PkgConfig: public FileTarget +class PkgConfigFile: public FileTarget { public: - PkgConfig(Builder &, const SourcePackage &); + PkgConfigFile(Builder &, const SourcePackage &); virtual const char *get_type() const { return "PkgConfig"; } }; 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(); -- 2.45.2