]> git.tdb.fi Git - builder.git/commitdiff
Un-abbreviate some function and variable names
authorMikko Rasa <tdb@tdb.fi>
Mon, 16 Jul 2012 22:16:53 +0000 (01:16 +0300)
committerMikko Rasa <tdb@tdb.fi>
Mon, 16 Jul 2012 23:30:04 +0000 (02:30 +0300)
31 files changed:
source/analyzer.cpp
source/binary.cpp
source/binary.h
source/builder.cpp
source/builder.h
source/component.cpp
source/component.h
source/config.cpp
source/config.h
source/csourcefile.cpp
source/csourcefile.h
source/datafile.cpp
source/dependencycache.cpp
source/filetarget.cpp
source/gnuarchiver.cpp
source/gnucompiler.cpp
source/gnulinker.cpp
source/installedfile.cpp
source/objectfile.cpp
source/objectfile.h
source/package.h
source/packagemanager.cpp
source/pkgconfigfile.cpp
source/pkgconfiggenerator.cpp
source/sourcepackage.cpp
source/sourcepackage.h
source/staticlibrary.cpp
source/tar.cpp
source/tarball.cpp
source/target.cpp
source/target.h

index b04049683461f93f2e94fb5e66a6c00b5a68fdc1..7ea1fff8c58aa0d1dbcb2e25ffca4e93b1d68e3e 100644 (file)
@@ -26,7 +26,7 @@ void Analyzer::analyze()
                const Builder::TargetMap &targets = builder.get_targets();
                for(Builder::TargetMap::const_iterator i=targets.begin(); i!=targets.end(); ++i)
                {
-                       const Target::Dependencies &depends = i->second->get_depends();
+                       const Target::Dependencies &depends = i->second->get_dependencies();
                        for(Target::Dependencies::const_iterator j=depends.begin(); j!=depends.end(); ++j)
                                rdepends[*j].insert(i->second);
                }
@@ -45,7 +45,7 @@ void Analyzer::analyze()
        Target &cmdline = *builder.get_target("cmdline");
        if(mode==RDEPS)
        {
-               const Target::Dependencies &deps = cmdline.get_depends();
+               const Target::Dependencies &deps = cmdline.get_dependencies();
                for(Target::Dependencies::const_iterator i=deps.begin(); i!=deps.end(); ++i)
                        build_depend_table(**i, 0);
        }
@@ -108,7 +108,7 @@ void Analyzer::build_depend_table(Target &tgt, unsigned depth)
                        depends.assign(rdeps.begin(), rdeps.end());
                }
                else
-                       depends = tgt.get_depends();
+                       depends = tgt.get_dependencies();
 
                depends.sort(full_paths ? target_order_full : target_order);
 
index 0dcb62f01a057dfc66085f3524ccf5553d586cc5..6fd6161989f24450ca4352b60126f474d545f366 100644 (file)
@@ -20,10 +20,10 @@ Binary::Binary(Builder &b, const Component &c, const string &p, const list<Objec
 {
        component = &c;
        for(list<ObjectFile *>::const_iterator i=objs.begin(); i!=objs.end(); ++i)
-               add_depend(**i);
+               add_dependency(**i);
 }
 
-void Binary::find_depends()
+void Binary::find_dependencies()
 {
        if(!component)
                return;
@@ -64,6 +64,6 @@ void Binary::find_depends()
                for(list<Target *>::iterator j=i; (last && j!=dep_libs.end()); ++j)
                        last = (j==i || *j!=*i);
                if(last)
-                       add_depend(**i);
+                       add_dependency(**i);
        }
 }
index 303bd51fa60589de50f6cc6ff229f0f44ce87af1..8e6761f6c434ea7fa4dbfd8fafb47658071859eb 100644 (file)
@@ -17,7 +17,7 @@ protected:
        Binary(Builder &, const Component &, const std::string &, const std::list<ObjectFile *> &);
 
 public:
-       virtual void find_depends();
+       virtual void find_dependencies();
 };
 
 #endif
index 209321224db7c3966195d848cbf712d01211aa50..2f71f1a74c2b3e8ccbd93bf235618a07cdd1ce99 100644 (file)
@@ -380,13 +380,13 @@ bool Builder::prepare_build()
        Target *world = new VirtualTarget(*this, "world");
 
        Target *def_tgt = new VirtualTarget(*this, "default");
-       world->add_depend(*def_tgt);
+       world->add_dependency(*def_tgt);
 
        Target *install = new VirtualTarget(*this, "install");
-       world->add_depend(*install);
+       world->add_dependency(*install);
 
        Target *tarballs = new VirtualTarget(*this, "tarballs");
-       world->add_depend(*tarballs);
+       world->add_dependency(*tarballs);
 
        main_pkg->prepare();
 
@@ -405,7 +405,7 @@ bool Builder::prepare_build()
                        return false;
                }
 
-               cmdline->add_depend(*tgt);
+               cmdline->add_dependency(*tgt);
        }
 
        cmdline->prepare();
@@ -541,7 +541,7 @@ int Builder::do_clean()
                if(tgt->is_buildable() && (tgt->get_package()==main_pkg || clean>=2))
                        clean_tgts.insert(tgt);
 
-               const Target::Dependencies &deps = tgt->get_depends();
+               const Target::Dependencies &deps = tgt->get_dependencies();
                for(list<Target *>::const_iterator i=deps.begin(); i!=deps.end(); ++i)
                        if(!clean_tgts.count(*i))
                                queue.push_back(*i);
@@ -561,7 +561,7 @@ void Builder::package_help()
        const Config::OptionMap &options = config.get_options();
 
        IO::print("Required packages:\n  ");
-       const PackageList &requires = main_pkg->get_requires();
+       const PackageList &requires = main_pkg->get_required_packages();
        for(PackageList::const_iterator i=requires.begin(); i!=requires.end(); ++i)
        {
                if(i!=requires.begin())
@@ -572,9 +572,9 @@ void Builder::package_help()
        for(Config::OptionMap::const_iterator i=options.begin(); i!=options.end(); ++i)
        {
                const Config::Option &opt = i->second;
-               IO::print("  %s: %s (%s)", opt.name, opt.descr, opt.value);
-               if(opt.value!=opt.defv)
-                       IO::print(" [%s]", opt.defv);
+               IO::print("  %s: %s (%s)", opt.name, opt.description, opt.value);
+               if(opt.value!=opt.default_value)
+                       IO::print(" [%s]", opt.default_value);
                IO::print("\n");
        }
 }
index 55af18a5a2e9b4db855bcefdb67cf84cb9386d89..eecbb984304225e1768f683c4ee154e80a33b74d 100644 (file)
@@ -104,7 +104,7 @@ public:
 
        const TargetMap &get_targets() const { return targets; }
 
-       const Msp::FS::Path &get_cwd() const { return cwd; }
+       const Msp::FS::Path &get_work_directory() const { return cwd; }
        const Architecture &get_current_arch() const { return *current_arch; }
        const Architecture &get_native_arch() const { return native_arch; }
        const Msp::FS::Path &get_prefix() const { return prefix; }
index 3f8b004ce172af9a96b36ee6af13d7a586c6de75..23bd37417142235a7d13878f76f03a58a704d210 100644 (file)
@@ -23,7 +23,7 @@ using namespace std;
 using namespace Msp;
 
 Component::Component(SourcePackage &p, Type t, const string &n):
-       pkg(p),
+       package(p),
        type(t),
        name(n),
        install(false),
@@ -38,7 +38,7 @@ void Component::prepare()
 
 void Component::create_build_info()
 {
-       const PackageList &pkg_reqs = pkg.get_requires();
+       const PackageList &pkg_reqs = package.get_required_packages();
        PackageList direct_reqs = requires;
        direct_reqs.insert(direct_reqs.end(), pkg_reqs.begin(), pkg_reqs.end());
 
@@ -48,20 +48,20 @@ void Component::create_build_info()
                BuildInfo::UpdateLevel level = BuildInfo::CHAINED;
                if(find(direct_reqs.begin(), direct_reqs.end(), *i)!=direct_reqs.end())
                        level = BuildInfo::DEPENDENCY;
-               build_info.update_from((*i)->get_exported_binfo(), level);
+               build_info.update_from((*i)->get_exported_build_info(), level);
 
-               const PackageList &reqs = (*i)->get_requires();
+               const PackageList &reqs = (*i)->get_required_packages();
                for(PackageList::const_iterator j=reqs.begin(); j!=reqs.end(); ++j)
                        if(find(all_reqs.begin(), all_reqs.end(), *j)==all_reqs.end())
                                all_reqs.push_back(*j);
        }
 
-       build_info.update_from(pkg.get_build_info());
+       build_info.update_from(package.get_build_info());
 
        for(BuildInfo::PathList::iterator i=build_info.incpath.begin(); i!=build_info.incpath.end(); ++i)
-               *i = (pkg.get_source() / *i).str();
+               *i = (package.get_source_directory() / *i).str();
        for(BuildInfo::PathList::iterator i=build_info.libpath.begin(); i!=build_info.libpath.end(); ++i)
-               *i = (pkg.get_source() / *i).str();
+               *i = (package.get_source_directory() / *i).str();
 
        if(type==LIBRARY || type==MODULE)
                if(build_info.libmode<BuildInfo::DYNAMIC)
@@ -71,7 +71,7 @@ void Component::create_build_info()
        {
                for(PackageList::iterator i=all_reqs.begin(); i!=all_reqs.end(); ++i)
                {
-                       const BuildInfo &ebi = (*i)->get_exported_binfo();
+                       const BuildInfo &ebi = (*i)->get_exported_build_info();
                        build_info.libpath.insert(build_info.libpath.end(), ebi.libpath.begin(), ebi.libpath.end());
                }
        }
@@ -79,7 +79,7 @@ void Component::create_build_info()
 
 void Component::create_targets() const
 {
-       Builder &builder = pkg.get_builder();
+       Builder &builder = package.get_builder();
        const Toolchain &toolchain = builder.get_toolchain();
        Target *world = builder.get_target("world");
        Target *def_tgt = builder.get_target("default");
@@ -95,8 +95,8 @@ void Component::create_targets() const
                string tarname = name;
                if(name=="@src")
                {
-                       tarname = pkg.get_name()+"-"+pkg.get_version();
-                       source_filenames.push_back(pkg.get_source()/"Build");
+                       tarname = package.get_name()+"-"+package.get_version();
+                       source_filenames.push_back(package.get_source_directory()/"Build");
                }
 
                list<Target *> files;
@@ -112,7 +112,7 @@ void Component::create_targets() const
                {
                        const Builder::TargetMap &targets = builder.get_targets();
                        for(Builder::TargetMap::const_iterator i=targets.begin(); i!=targets.end(); ++i)
-                               if(i->second->get_package()==&pkg && !i->second->is_buildable())
+                               if(i->second->get_package()==&package && !i->second->is_buildable())
                                        files.push_back(i->second);
                }
 
@@ -121,7 +121,7 @@ void Component::create_targets() const
                /*Target *result = tar.create_target(files, tarname);
 
                Target *tarballs_tgt = builder.get_target("tarballs");
-               tarballs_tgt->add_depend(*result);*/
+               tarballs_tgt->add_dependency(*result);*/
 
                return;
        }
@@ -134,7 +134,7 @@ void Component::create_targets() const
                        if(Target *tgt = builder.get_vfs().get_target(*i))
                                ft = dynamic_cast<FileTarget *>(tgt);
                        else
-                               ft = new File(builder, pkg, *i);
+                               ft = new File(builder, package, *i);
                        inst_list.push_back(ft);
                }
        }
@@ -146,13 +146,13 @@ void Component::create_targets() const
                if(Target *tgt = builder.get_vfs().get_target(source_filenames.front()))
                        source = dynamic_cast<File *>(tgt);
                else
-                       source = new File(builder, pkg, source_filenames.front());
+                       source = new File(builder, package, source_filenames.front());
                Target *result = dcomp.create_target(*source);
 
-               if(&pkg==builder.get_main_package() && deflt)
-                       def_tgt->add_depend(*result);
+               if(&package==builder.get_main_package() && deflt)
+                       def_tgt->add_dependency(*result);
                else
-                       world->add_depend(*result);
+                       world->add_dependency(*result);
                if(install)
                        inst_list.push_back(result);
        }
@@ -194,10 +194,10 @@ void Component::create_targets() const
 
                for(list<Target *>::const_iterator i=results.begin(); i!=results.end(); ++i)
                {
-                       if(&pkg==builder.get_main_package() && deflt)
-                               def_tgt->add_depend(**i);
+                       if(&package==builder.get_main_package() && deflt)
+                               def_tgt->add_dependency(**i);
                        else
-                               world->add_depend(**i);
+                               world->add_dependency(**i);
                        if(install)
                                inst_list.push_back(*i);
                }
@@ -208,7 +208,7 @@ void Component::create_targets() const
        for(list<Target *>::const_iterator i=inst_list.begin(); i!=inst_list.end(); ++i)
        {
                Target *inst = copy.create_target(**i, inst_loc);
-               inst_tgt->add_depend(*inst);
+               inst_tgt->add_dependency(*inst);
        }
 }
 
@@ -220,7 +220,7 @@ PathList Component::collect_source_files() const
                FS::Path path(*i);
                if(FS::is_dir(path))
                {
-                       pkg.get_builder().get_logger().log("files", format("Traversing %s", path));
+                       package.get_builder().get_logger().log("files", format("Traversing %s", path));
                        list<string> sfiles = list_files(path);
                        for(list<string>::iterator j=sfiles.begin(); j!=sfiles.end(); ++j)
                                files.push_back(path / *j);
@@ -246,12 +246,12 @@ Component::Loader::Loader(Component &c):
 
 void Component::Loader::source(const string &s)
 {
-       obj.sources.push_back((obj.pkg.get_source()/s).str());
+       obj.sources.push_back((obj.package.get_source_directory()/s).str());
 }
 
 void Component::Loader::require(const string &n)
 {
-       Package *req = obj.pkg.get_builder().get_package_manager().find_package(n);
+       Package *req = obj.package.get_builder().get_package_manager().find_package(n);
        if(req)
                obj.requires.push_back(req);
 }
@@ -263,5 +263,5 @@ void Component::Loader::build_info()
 
 void Component::Loader::install_map()
 {
-       load_sub(obj.install_map, obj.pkg.get_source());
+       load_sub(obj.install_map, obj.package.get_source_directory());
 }
index 5f1332fcb40f8a947dc858b0a2ff0cce0f3d1935..5da28838f5d5035fe44aa3a51d798bdd26c92097 100644 (file)
@@ -42,7 +42,7 @@ public:
        };
 
 protected:
-       SourcePackage &pkg;
+       SourcePackage &package;
        Type type;
        std::string name;
        StringList sources;
@@ -55,13 +55,13 @@ protected:
 public:
        Component(SourcePackage &, Type, const std::string &);
 
-       const SourcePackage &get_package() const { return pkg; }
+       const SourcePackage &get_package() const { return package; }
        Type get_type() const { return type; }
        const std::string &get_name() const { return name; }
        const StringList &get_sources() const { return sources; }
        const BuildInfo &get_build_info() const { return build_info; }
        bool get_install() const { return install; }
-       const PackageList &get_requires() const { return requires; }
+       const PackageList &get_required_packages() const { return requires; }
        bool is_default() const { return deflt; }
        const InstallMap &get_install_map() const { return install_map; }
 
index e4449cc80aaad3fe16c7b628f4708bdff5a80e30..f3110039e79e9c84b8e664e7f560d944a473c921 100644 (file)
@@ -39,7 +39,7 @@ void Config::save() const
        if(!changed)
                return;
 
-       FS::Path fn = package.get_source()/".config";
+       FS::Path fn = package.get_source_directory()/".config";
 
        package.get_builder().get_logger().log("files", format("Writing %s", fn));
        IO::BufferedFile out(fn.str(), IO::M_WRITE);
@@ -68,7 +68,7 @@ bool Config::set_option(const string &opt, const string &val)
 
 void Config::load()
 {
-       FS::Path fn = package.get_source()/".config";
+       FS::Path fn = package.get_source_directory()/".config";
        FS::Stat stat = FS::stat(fn);
        if(stat)
        {
@@ -86,8 +86,8 @@ void Config::load()
 
 Config::Option::Option(const string &n, const string &v, const string &d):
        name(n),
-       defv(v),
-       descr(d),
+       default_value(v),
+       description(d),
        value(v)
 { }
 
index 8372af90f99c330c197a0343000b63d481df0013..91a6ef07e7c7e75845994b361ab2f2d0c3cd493d 100644 (file)
@@ -21,8 +21,8 @@ public:
        struct Option
        {
                std::string name;
-               std::string defv;
-               std::string descr;
+               std::string default_value;
+               std::string description;
                std::string value;
 
                Option(const std::string &, const std::string &, const std::string &);
index b0346e46cd01d94dc5d57ef01daf2823f8bb37cb..5628e04adb0aed6310b015c2d0c228cac8c40f10 100644 (file)
@@ -22,17 +22,17 @@ CSourceFile::CSourceFile(Builder &b, const Component &c, const FS::Path &p):
                install_location = FS::Path("include")/package->get_name();
 }
 
-void CSourceFile::find_depends()
+void CSourceFile::find_dependencies()
 {
        if(!component || !mtime)
                return;
 
        const SourcePackage &spkg = component->get_package();
-       string relname = FS::relative(path, spkg.get_source()).str();
+       string deps_key = FS::relative(path, spkg.get_source_directory()).str();
 
-       DependencyCache &deps_cache = spkg.get_deps_cache();
-       if(mtime<deps_cache.get_mtime() && deps_cache.has_deps(relname))
-               includes = deps_cache.get_deps(relname);
+       DependencyCache &deps_cache = spkg.get_dependency_cache();
+       if(mtime<deps_cache.get_mtime() && deps_cache.has_deps(deps_key))
+               includes = deps_cache.get_deps(deps_key);
        else
        {
                IO::BufferedFile in(path.str());
@@ -46,7 +46,7 @@ void CSourceFile::find_depends()
                        if(RegMatch match = r_include.match(line))
                                includes.push_back(match[1].str);
 
-               deps_cache.set_deps(relname, includes);
+               deps_cache.set_deps(deps_key, includes);
        }
 
        const BuildInfo::PathList &incpath = component->get_build_info().incpath;
@@ -57,6 +57,6 @@ void CSourceFile::find_depends()
        {
                Target *hdr = builder.get_vfs().find_header(i->substr(1), ((*i)[0]=='"' ? local_incpath : incpath));
                if(hdr)
-                       add_depend(*hdr);
+                       add_dependency(*hdr);
        }
 }
index 9e231d9f36cd4ea4353a9fc331977ab8affc8a0c..035f66780725135a4c49799a03666a8fffcc07d7 100644 (file)
@@ -18,7 +18,7 @@ public:
 
        virtual const char *get_type() const { return "CSourceFile"; }
        const StringList &get_includes() const { return includes; }
-       virtual void find_depends();
+       virtual void find_dependencies();
 };
 
 #endif
index 188bbdb8d88c44966080ca3e1da835c1725732f1..bb61d7dea7babecc4bafb8cbbe9f4b029f11d15a 100644 (file)
@@ -8,7 +8,7 @@ DataFile::DataFile(Builder &b, const Component &c, File &s):
        component(c),
        source(s)
 {
-       add_depend(source);
+       add_dependency(source);
 
        install_location = Msp::FS::Path("share")/package->get_name();
 }
index e91bdbc91da0e0e8f59c5ec3cf4b010b8b41a793..a4211a3193066bc3049921026c60df2877c2f2c4 100644 (file)
@@ -36,7 +36,7 @@ void DependencyCache::save() const
        if(deps.empty() || !changed)
                return;
 
-       FS::Path fn = package.get_source()/".deps";
+       FS::Path fn = package.get_source_directory()/".deps";
        package.get_builder().get_logger().log("files", format("Writing %s", fn));
        IO::BufferedFile out(fn.str(), IO::M_WRITE);
 
@@ -51,7 +51,7 @@ void DependencyCache::save() const
 
 void DependencyCache::load()
 {
-       FS::Path fn = package.get_source()/".deps";
+       FS::Path fn = package.get_source_directory()/".deps";
 
        if(FS::Stat st = FS::stat(fn))
        {
index 9908c0d4d2836c36c5e05e1eda9aa221bab067b2..21c2bbf2019bc9fb64bbd80a2f48408d239400ea 100644 (file)
@@ -39,9 +39,9 @@ void FileTarget::init(const SourcePackage *p)
 
 string FileTarget::generate_name(Builder &builder, const SourcePackage *pkg, const FS::Path &path)
 {
-       if(pkg && FS::descendant_depth(path, pkg->get_source())>=0)
+       if(pkg && FS::descendant_depth(path, pkg->get_source_directory())>=0)
        {
-               FS::Path relpath = FS::relative(path, pkg->get_source());
+               FS::Path relpath = FS::relative(path, pkg->get_source_directory());
                return format("<%s>%s", pkg->get_name(), relpath.str().substr(1));
        }
        else if(FS::descendant_depth(path, builder.get_prefix())>=0)
index 71edc42d57d26d09560c9ddc1b389e0febcedae9..168a163449e9814e234bf4f1ee1187cc7a0be61a 100644 (file)
@@ -54,11 +54,11 @@ Task *GnuArchiver::run(const Target &target) const
        argv.push_back(executable->get_path().str());
        argv.push_back("rc");
 
-       FS::Path work_dir = comp.get_package().get_source();
+       FS::Path work_dir = comp.get_package().get_source_directory();
 
        argv.push_back(relative(lib.get_path(), work_dir).str());
 
-       const Target::Dependencies &deps = lib.get_depends();
+       const Target::Dependencies &deps = lib.get_dependencies();
        for(Target::Dependencies::const_iterator i=deps.begin(); i!=deps.end(); ++i)
                if(ObjectFile *obj = dynamic_cast<ObjectFile *>(*i))
                        argv.push_back(relative(obj->get_path(), work_dir).str());
index 36903937546a678f07e59e4bc2f101ddcb47b474..a6d27052e292e032123e4d5f1e7fbb94aa03c333 100644 (file)
@@ -82,7 +82,7 @@ Task *GnuCompiler::run(const Target &target) const
 
        FS::Path obj_path = object.get_path();
        FS::Path src_path = object.get_source().get_path();
-       FS::Path work_dir = comp.get_package().get_source();
+       FS::Path work_dir = comp.get_package().get_source_directory();
 
        argv.push_back("-o");
        argv.push_back(relative(obj_path, work_dir).str());
index 4276397b23c863b5ead37a90e5ca1b64af7cce84..f7982f7a626c9ac927c2e20b7db42794a72416ff 100644 (file)
@@ -134,14 +134,14 @@ Task *GnuLinker::Linker::run(const Target &target) const
        if(architecture->get_bits()!=native_arch.get_bits())
                argv.push_back(format("-m%d", architecture->get_bits()));
 
-       FS::Path work_dir = comp.get_package().get_source();
+       FS::Path work_dir = comp.get_package().get_source_directory();
 
        argv.push_back("-o");
        argv.push_back(relative(bin.get_path(), work_dir).str());
 
        bool static_link_ok = (binfo.libmode<=BuildInfo::STATIC);
 
-       const Target::Dependencies &depends = target.get_depends();
+       const Target::Dependencies &depends = target.get_dependencies();
        for(Target::Dependencies::const_iterator i=depends.begin(); i!=depends.end(); ++i)
        {
                Target *tgt = (*i)->get_real_target();
index f2909f6127ec94d72f475ed200a9182276fd4742..6960ccead45599ca62cbc0f1302076fe80bd7682 100644 (file)
@@ -11,7 +11,7 @@ InstalledFile::InstalledFile(Builder &b, const SourcePackage &p, FileTarget &s,
        FileTarget(b, p, generate_target_path(b.get_prefix(), s, loc)),
        source(s)
 {
-       add_depend(source);
+       add_dependency(source);
 
        if(const SharedLibrary *shlib = dynamic_cast<const SharedLibrary *>(&source))
                if(!shlib->get_soname().empty())
index 7aafe90d68c1412594a086b998cb828d78605269..ea4421674b0632372e5bddfb8ae5f18782ec9c56 100644 (file)
@@ -10,11 +10,11 @@ using namespace std;
 using namespace Msp;
 
 ObjectFile::ObjectFile(Builder &b, const Component &c, SourceFile &s):
-       FileTarget(b, c.get_package(), generate_target_path(c, FS::relative(s.get_path(), c.get_package().get_source()).str())),
+       FileTarget(b, c.get_package(), generate_target_path(c, FS::relative(s.get_path(), c.get_package().get_source_directory()).str())),
        source(s)       
 {
        component = &c;
-       add_depend(source);
+       add_dependency(source);
 }
 
 FS::Path ObjectFile::generate_target_path(const Component &comp, const string &src)
@@ -29,19 +29,19 @@ FS::Path ObjectFile::generate_target_path(const Component &comp, const string &s
        return pkg.get_temp_dir()/comp.get_name()/fn;
 }
 
-void ObjectFile::find_depends()
+void ObjectFile::find_dependencies()
 {
        for(Dependencies::iterator i=depends.begin(); i!=depends.end(); ++i)
        {
                (*i)->prepare();
-               find_depends(dynamic_cast<FileTarget *>(*i));
+               find_dependencies(dynamic_cast<FileTarget *>(*i));
        }
 }
 
-void ObjectFile::find_depends(FileTarget *tgt)
+void ObjectFile::find_dependencies(FileTarget *tgt)
 {
        FileTarget *rtgt = dynamic_cast<FileTarget *>(tgt->get_real_target());
-       const Dependencies &tdeps = rtgt->get_depends();
+       const Dependencies &tdeps = rtgt->get_dependencies();
        Dependencies deps_to_add;
        if(rtgt==tgt)
        {
@@ -57,7 +57,7 @@ void ObjectFile::find_depends(FileTarget *tgt)
                for(Dependencies::const_iterator i=tdeps.begin(); i!=tdeps.end(); ++i)
                {
                        FileTarget *file = dynamic_cast<FileTarget *>(*i);
-                       if(file && file->get_package()==tpkg && FS::descendant_depth(file->get_path(), tpkg->get_source())>=0)
+                       if(file && file->get_package()==tpkg && FS::descendant_depth(file->get_path(), tpkg->get_source_directory())>=0)
                        {
                                FS::Path displaced = tgt->get_path()/FS::relative(file->get_path(), rtgt->get_path());
                                if(Target *ddep = builder.get_vfs().get_target(displaced))
@@ -70,5 +70,5 @@ void ObjectFile::find_depends(FileTarget *tgt)
 
        for(Dependencies::const_iterator i=deps_to_add.begin(); i!=deps_to_add.end(); ++i)
                if(find(depends.begin(), depends.end(), *i)==depends.end())
-                       add_depend(**i);
+                       add_dependency(**i);
 }
index af7cc227997315c8394dc46468f01894dd4f7b3f..f6bded762cfb08daccf44d805feaff01bcee2175 100644 (file)
@@ -22,10 +22,10 @@ public:
        virtual const char *get_type() const { return "ObjectFile"; }
        SourceFile &get_source() const { return source; }
 
-       virtual void find_depends();
+       virtual void find_dependencies();
 
 private:
-       void find_depends(FileTarget *);
+       void find_dependencies(FileTarget *);
 };
 
 #endif
index e98f4e786f88b9d2fd4e674f1dcf76249e4965ee..5c80779aa67d94aeb60ee0d8383ef993afd1bc22 100644 (file)
@@ -45,9 +45,9 @@ public:
 
        const std::string &get_name() const { return name; }
        Builder &get_builder() const { return builder; }
-       const PackageList &get_requires() const { return requires; }
+       const PackageList &get_required_packages() const { return requires; }
 
-       const BuildInfo &get_exported_binfo() const { return export_binfo; }
+       const BuildInfo &get_exported_build_info() const { return export_binfo; }
 
        /// Indicates whether or not this package supports pkg-config
        bool get_use_pkgconfig() const { return use_pkgconfig; }
index 730f02271e32a5261c95829b89b51604c1296bef..ac1851d73c2ac3573b8e91afa46e4e8d9b68bdcb 100644 (file)
@@ -21,8 +21,8 @@ PackageManager::PackageManager(Builder &b):
        no_externals(false),
        env_set(false)
 {
-       pkg_path.push_back(builder.get_cwd()/".");
-       pkg_path.push_back(builder.get_cwd()/"..");
+       pkg_path.push_back(builder.get_work_directory()/".");
+       pkg_path.push_back(builder.get_work_directory()/"..");
 }
 
 PackageManager::~PackageManager()
index ec614964e91d1f6ba8a4f1627320fb3d6a6601cf..7631f9a111c32bfcd6a075fd17e7a85f0edb4012 100644 (file)
@@ -3,7 +3,7 @@
 #include "pkgconfigfile.h"
 
 PkgConfigFile::PkgConfigFile(Builder &b, const SourcePackage &p):
-       FileTarget(b, p, p.get_source()/(p.get_name()+".pc"))
+       FileTarget(b, p, p.get_source_directory()/(p.get_name()+".pc"))
 {
        tool = &builder.get_toolchain().get_tool("PCG");
 
index 141b363cda3d348692d93887cf335a84e9873d93..811fa5d2ef68e9e6bfdb9ef3d04a6c88ac2f4950 100644 (file)
@@ -37,20 +37,20 @@ void PkgConfigGenerator::Worker::main()
 
        IO::BufferedFile out(target.get_path().str(), IO::M_WRITE);
        IO::print(out, "prefix=%s\n", builder.get_prefix().str());
-       IO::print(out, "source=%s\n\n", spkg.get_source());
+       IO::print(out, "source=%s\n\n", spkg.get_source_directory());
 
        IO::print(out, "Name: %s\n", spkg.get_name());
        IO::print(out, "Description: %s\n", spkg.get_description());
        IO::print(out, "Version: %s\n", spkg.get_version());
 
        IO::print(out, "Requires:");
-       const PackageList &reqs = spkg.get_requires();
+       const PackageList &reqs = spkg.get_required_packages();
        for(PackageList::const_iterator i=reqs.begin(); i!=reqs.end(); ++i)
                if((*i)->get_use_pkgconfig())
                        IO::print(out, " %s", (*i)->get_name());
        out.put('\n');
 
-       const BuildInfo &binfo = spkg.get_exported_binfo();
+       const BuildInfo &binfo = spkg.get_exported_build_info();
        IO::print(out, "Libs:");
        for(BuildInfo::PathList::const_iterator i=binfo.libpath.begin(); i!=binfo.libpath.end(); ++i)
                IO::print(out, " -L%s", FS::relative(*i, builder.get_prefix()).str());
index 06ab5fe7441953a9652b9ae40b2c2df208755de9..3b0b296c2bdb1fb8f1955479f4f0929d15cc746e 100644 (file)
@@ -22,7 +22,7 @@ bool component_sort(const Component &c1, const Component &c2)
 
 SourcePackage::SourcePackage(Builder &b, const string &n, const FS::Path &s):
        Package(b, n),
-       source(s),
+       source_dir(s),
        build_type(0),
        config(*this),
        deps_cache(*this)
@@ -50,7 +50,7 @@ FS::Path SourcePackage::get_temp_dir() const
        if(temp.is_absolute())
                return temp/name/subdir;
        else
-               return source/temp/subdir;
+               return source_dir/temp/subdir;
 }
 
 FS::Path SourcePackage::get_out_dir() const
@@ -58,9 +58,9 @@ FS::Path SourcePackage::get_out_dir() const
        const Architecture &arch = builder.get_current_arch();
        string detail = (build_type ? build_type->get_name() : string());
        if(arch.is_native())
-               return source/detail;
+               return source_dir/detail;
        else
-               return source/arch.get_name()/detail;
+               return source_dir/arch.get_name()/detail;
 }
 
 void SourcePackage::create_build_info()
@@ -113,7 +113,7 @@ void SourcePackage::create_targets()
        if(pc_needed)
        {
                PkgConfigFile *pc = new PkgConfigFile(builder, *this);
-               builder.get_target("install")->add_depend(*builder.get_toolchain().get_tool("CP").create_target(*pc));
+               builder.get_target("install")->add_dependency(*builder.get_toolchain().get_tool("CP").create_target(*pc));
        }
 }
 
@@ -169,7 +169,7 @@ void SourcePackage::Loader::finish()
                        {
                                if(!i->first.compare(0, k->size(), *k))
                                {
-                                       const_cast<InstallMap &>(j->get_install_map()).add_mapping(obj.source/i->first, i->second);
+                                       const_cast<InstallMap &>(j->get_install_map()).add_mapping(obj.source_dir/i->first, i->second);
                                }
                        }
                }
@@ -280,5 +280,5 @@ void SourcePackage::Loader::tar_file(const string &f)
        IO::print("%s: Note: tar_file is deprecated\n", get_source());
        for(ComponentList::iterator i=obj.components.begin(); i!=obj.components.end(); ++i)
                if(i->get_type()==Component::TARBALL && i->get_name()=="@src")
-                       const_cast<StringList &>(i->get_sources()).push_back((obj.source/f).str());
+                       const_cast<StringList &>(i->get_sources()).push_back((obj.source_dir/f).str());
 }
index 20461fb6187f6f975ef31881f538d1de74b53527..c143a276f0db446b142d3e860172c3de2ff72324 100644 (file)
@@ -57,7 +57,7 @@ private:
        std::string version;
        std::string description;
 
-       Msp::FS::Path source;
+       Msp::FS::Path source_dir;
        const BuildType *build_type;
        FeatureList features;
        BuildInfo build_info;
@@ -70,7 +70,7 @@ public:
 
        const std::string &get_version() const { return version; }
        const std::string &get_description() const { return description; }
-       const Msp::FS::Path &get_source() const { return source; }
+       const Msp::FS::Path &get_source_directory() const { return source_dir; }
        Msp::FS::Path get_temp_dir() const;
        Msp::FS::Path get_out_dir() const;
        const ComponentList &get_components() const { return components; }
@@ -79,7 +79,7 @@ public:
        const BuildInfo &get_build_info() const { return build_info; }
        Builder &get_builder() const { return builder; }
 
-       DependencyCache &get_deps_cache() const { return deps_cache; }
+       DependencyCache &get_dependency_cache() const { return deps_cache; }
 private:
        virtual void create_build_info();
 
index 8e3950f7d97eea35e62c805fa99540f2c6b1d411..2bb17fc04b9ff47b1f0552039f04687a2cc571f5 100644 (file)
@@ -16,7 +16,7 @@ StaticLibrary::StaticLibrary(Builder &b, const Component &c, const list<ObjectFi
 {
        component = &c;
        for(list<ObjectFile *>::const_iterator i=objs.begin(); i!=objs.end(); ++i)
-               add_depend(**i);
+               add_dependency(**i);
 
        install_location = "lib";
 }
index a85ee3d4ad01b1c5b07f905204e6054456515528..b4ba71e52518c815c45e620fe247e586044f1fde 100644 (file)
@@ -22,7 +22,7 @@ Target *Tar::create_target(const list<Target *> &sources, const string &arg) con
 
        TarBall *tarball = new TarBall(builder, *sources.front()->get_package(), arg);
        for(list<Target *>::const_iterator i=sources.begin(); i!=sources.end(); ++i)
-               tarball->add_depend(**i);
+               tarball->add_dependency(**i);
 
        return tarball;
 }
@@ -41,11 +41,11 @@ Tar::Worker::Worker(const TarBall &tb):
 
 void Tar::Worker::main()
 {
-       const FS::Path &pkg_src = tarball.get_package()->get_source();
+       const FS::Path &pkg_src = tarball.get_package()->get_source_directory();
        FS::Path basedir = FS::basepart(FS::basename(tarball.get_path()));
 
        IO::File out(tarball.get_path().str(), IO::M_WRITE);
-       const Target::Dependencies &deps = tarball.get_depends();
+       const Target::Dependencies &deps = tarball.get_dependencies();
        for(Target::Dependencies::const_iterator i=deps.begin(); i!=deps.end(); ++i)
        {
                FileTarget *ft = dynamic_cast<FileTarget *>(*i);
index fe5a10a722b87980261cdd108d33c7bc0c32520a..7596a3d25f1f1ed92dd64a735ca317d9e27dd6cb 100644 (file)
@@ -5,7 +5,7 @@
 using namespace std;
 
 TarBall::TarBall(Builder &b, const SourcePackage &p, const string &n):
-       FileTarget(b, p, p.get_source()/(n+".tar"))
+       FileTarget(b, p, p.get_source_directory()/(n+".tar"))
 { }
 
 const SourcePackage *TarBall::get_package() const
index cf4fae93d2aa3c851ea54627f4ec124fd3864ac4..cd4cf36370b252ca55ca6a954a1d51b5c1c10dd9 100644 (file)
@@ -22,7 +22,7 @@ Target::Target(Builder &b, const string &n):
        builder.add_target(this);
 }
 
-void Target::add_depend(Target &dep)
+void Target::add_dependency(Target &dep)
 {
        if(&dep==this)
                throw invalid_argument("Target::add_depend");
@@ -88,11 +88,11 @@ void Target::prepare()
        }
 
        state = PREPARING;
-       find_depends();
+       find_dependencies();
        if(tool)
        {
                if(FileTarget *tool_exe = tool->get_executable())
-                       add_depend(*tool_exe);
+                       add_dependency(*tool_exe);
        }
 
        for(Dependencies::iterator i=depends.begin(); i!=depends.end(); ++i)
index 62b67218480184d1888bd5a0d6c6a503ecf1f674..f264905ef829114eee8e638d608c0edac94037bb 100644 (file)
@@ -60,17 +60,17 @@ public:
        /** Adds a dependency for the target.  Order is preseved and is important
        for some target types.  It is an error to create dependency cycles, although
        this won't be detected until the targets are prepared. */
-       void add_depend(Target &);
+       void add_dependency(Target &);
 
 protected:
        /** Finds dependencies for the target.  Called during preparation.  If the
        target needs to recursively inspect its dependencies, it should prepare its
        direct dependencies first. */
-       virtual void find_depends() { }
+       virtual void find_dependencies() { }
 
 public:
        /// Returns the dependencies of the target, in the order they were added.
-       const Dependencies &get_depends() const { return depends; }
+       const Dependencies &get_dependencies() const { return depends; }
 
        /** Tries to locate a target that will help getting this target built.  If
        all dependencies are up-to-date, returns this target.  If there are no