]> git.tdb.fi Git - builder.git/blobdiff - source/install.cpp
Style update: add spaces around assignment operators
[builder.git] / source / install.cpp
index 27bb9a334a970a5936efcad487ce720917bd7588..893f021387cbb81e346fb47e8418f8402ee58c49 100644 (file)
@@ -24,7 +24,7 @@ Install::Install(Builder &b, const SourcePackage &p, FileTarget &s, const std::s
        FileTarget(b, &p, generate_target_path(s, loc)),
        source(s)
 {
-       buildable=true;
+       buildable = true;
        add_depend(&source);
 }
 
@@ -48,34 +48,34 @@ FS::Path Install::generate_target_path(const FileTarget &tgt, const std::string
        if(!tgt.get_package())
                throw InvalidParameterValue("Can't install package-less targets");
 
-       FS::Path base=tgt.get_package()->get_builder().get_prefix();
-       string tgtname=FS::basename(tgt.get_path());
+       FS::Path base = tgt.get_package()->get_builder().get_prefix();
+       string tgtname = FS::basename(tgt.get_path());
 
        string mid;
        if(!loc.empty())
-               mid=loc;
-       else if(const Header *hdr=dynamic_cast<const Header *>(&tgt))
+               mid = loc;
+       else if(const Header *hdr = dynamic_cast<const Header *>(&tgt))
        {
                if(hdr->get_component()->get_type()!=Component::HEADERS)
                        throw Exception("Header install from non-header component?");
-               mid="include/"+hdr->get_component()->get_name();
+               mid = "include/"+hdr->get_component()->get_name();
        }
        else if(dynamic_cast<const Executable *>(&tgt))
-               mid="bin";
-       else if(const SharedLibrary *shlib=dynamic_cast<const SharedLibrary *>(&tgt))
+               mid = "bin";
+       else if(const SharedLibrary *shlib = dynamic_cast<const SharedLibrary *>(&tgt))
        {
-               const Component &comp=shlib->get_component();
+               const Component &comp = shlib->get_component();
                if(comp.get_type()==Component::LIBRARY)
-                       mid="lib";
+                       mid = "lib";
                else if(comp.get_type()==Component::MODULE)
-                       mid="lib/"+tgt.get_package()->get_name();
+                       mid = "lib/"+tgt.get_package()->get_name();
        }
        else if(dynamic_cast<const StaticLibrary *>(&tgt))
-               mid="lib";
+               mid = "lib";
        else if(dynamic_cast<const PkgConfig *>(&tgt))
-               mid="lib/pkgconfig";
+               mid = "lib/pkgconfig";
        else if(dynamic_cast<const ::DataFile *>(&tgt))
-               mid="share/"+tgt.get_package()->get_name();
+               mid = "share/"+tgt.get_package()->get_name();
 
        if(mid.empty())
                throw InvalidParameterValue("Don't know where to install "+tgtname);