]> git.tdb.fi Git - builder.git/commitdiff
Reorder functions
authorMikko Rasa <tdb@tdb.fi>
Sun, 14 Apr 2013 12:21:36 +0000 (15:21 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 14 Apr 2013 15:11:08 +0000 (18:11 +0300)
source/component.cpp
source/component.h
source/package.h
source/sourcepackage.cpp
source/sourcepackage.h

index 5104cdf3e92b04c8567304baae993bf974f9952c..48675f7e5d7c0148cc2752f39f6946ff163a9f32 100644 (file)
@@ -254,6 +254,11 @@ Component::Loader::Loader(Component &c):
        add("use",             &Loader::use);
 }
 
+void Component::Loader::build_info()
+{
+       load_sub(obj.build_info);
+}
+
 void Component::Loader::if_arch(const string &cond)
 {
        bool match = obj.package.get_builder().get_current_arch().match_name(cond);
@@ -272,9 +277,9 @@ void Component::Loader::if_feature(const string &cond)
                load_sub_with(*this);
 }
 
-void Component::Loader::source(const string &s)
+void Component::Loader::install_map()
 {
-       obj.sources.push_back((obj.package.get_source_directory()/s).str());
+       load_sub(obj.install_map, obj.package.get_source_directory());
 }
 
 void Component::Loader::require(const string &n)
@@ -284,14 +289,9 @@ void Component::Loader::require(const string &n)
                obj.requires.push_back(req);
 }
 
-void Component::Loader::build_info()
-{
-       load_sub(obj.build_info);
-}
-
-void Component::Loader::install_map()
+void Component::Loader::source(const string &s)
 {
-       load_sub(obj.install_map, obj.package.get_source_directory());
+       obj.sources.push_back((obj.package.get_source_directory()/s).str());
 }
 
 void Component::Loader::use(const string &n)
index 83a8baa20f124fb84849bc0f4235d5d3665c0a91..044c5ba0a1343fb843e9d3e9ec54c98981ac8bb5 100644 (file)
@@ -24,12 +24,12 @@ public:
        public:
                Loader(Component &);
        private:
+               void build_info();
                void if_arch(const std::string &);
                void if_feature(const std::string &);
-               void source(const std::string &);
-               void require(const std::string &);
-               void build_info();
                void install_map();
+               void require(const std::string &);
+               void source(const std::string &);
                void use(const std::string &);
        };
 
index 3a7ba3ab3c19cd71410874eeb2fd0877098ac478..aed1fd9c061b1f37fde116c42ec23ee539d3a3a5 100644 (file)
@@ -44,8 +44,8 @@ protected:
 public:
        virtual ~Package() { }
 
-       const std::string &get_name() const { return name; }
        Builder &get_builder() const { return builder; }
+       const std::string &get_name() const { return name; }
        const Requirements &get_required_packages() const { return requires; }
 
        const BuildInfo &get_exported_build_info() const { return export_binfo; }
index b84b22a58f0a33ea326cfc99845e9363ade5081c..2cefeb871065e76434d10642fa57dd7928f61b9f 100644 (file)
@@ -37,11 +37,6 @@ SourcePackage::SourcePackage(Builder &b, const string &n, const FS::Path &f):
        source_tarball = &components.back();
 }
 
-void SourcePackage::set_build_type(const BuildType &t)
-{
-       build_type = &t;
-}
-
 FS::Path SourcePackage::get_temp_directory() const
 {
        string subdir = builder.get_current_arch().get_name();
@@ -88,6 +83,11 @@ bool SourcePackage::match_feature(const string &cond) const
        }
 }
 
+void SourcePackage::set_build_type(const BuildType &t)
+{
+       build_type = &t;
+}
+
 void SourcePackage::do_prepare()
 {
        BuildInfo final_build_info;
index 94555d6e3e96dc85c3ad662f0c896a10637f3af6..e5c315231f8e77aa084b68bfd78c18867bb1067c 100644 (file)
@@ -79,20 +79,23 @@ public:
        const std::string &get_version() const { return version; }
        const std::string &get_interface_version() const { return interface_version; }
        const std::string &get_description() const { return description; }
+
        FileTarget &get_build_file() const { return *build_file; }
        const Msp::FS::Path &get_source_directory() const { return source_dir; }
        Msp::FS::Path get_temp_directory() const;
        Msp::FS::Path get_output_directory() const;
+
        const ComponentList &get_components() const { return components; }
        const Config &get_config() const { return config; }
        bool match_feature(const std::string &) const;
        void set_build_type(const BuildType &);
        const BuildInfo &get_build_info() const { return build_info; }
-
-       Cache &get_cache() const { return cache; }
 private:
        virtual void do_prepare();
 
+public:
+       Cache &get_cache() const { return cache; }
+private:
        virtual void save_caches();
 };