]> git.tdb.fi Git - builder.git/commitdiff
Move some install location assignments to more logical places
authorMikko Rasa <tdb@tdb.fi>
Fri, 4 May 2012 19:15:45 +0000 (22:15 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 8 Jul 2012 21:08:50 +0000 (00:08 +0300)
source/binary.cpp
source/executable.cpp
source/sharedlibrary.cpp

index b8445c14079c8e73946862aa1d34e4d4954cbd4d..b3f018488347fc090d57839a0a0cc7344eaf40e2 100644 (file)
@@ -18,13 +18,6 @@ Binary::Binary(Builder &b, const Component &c, const list<ObjectFile *> &objs):
 {
        for(list<ObjectFile *>::const_iterator i=objs.begin(); i!=objs.end(); ++i)
                add_depend(*i);
-
-       if(c.get_type()==Component::LIBRARY)
-               install_location = "lib";
-       else if(c.get_type()==Component::MODULE)
-               install_location = "lib/"+package->get_name();
-       else if(c.get_type()==Component::PROGRAM)
-               install_location = "bin";
 }
 
 void Binary::find_depends()
index 4758d5fd0752a6de93db096965bf693249772454..039267a0b86d9a3b5b7544e7c14d651ddbe09318 100644 (file)
@@ -5,4 +5,6 @@
 Executable::Executable(Builder &b, const Component &c, const std::list<ObjectFile *> &objs):
        FileTarget(b, &c.get_package(), generate_target_path(c)),
        Binary(b, c, objs)
-{ }
+{
+       install_location = "bin";
+}
index 6a197bac08c69535ccb53fd98b62d6a04c7c189f..fac651a8e3518737187f817c0d4d14ee2575e036 100644 (file)
@@ -12,7 +12,14 @@ SharedLibrary::SharedLibrary(Builder &b, const Component &c, const list<ObjectFi
        Binary(b, c, objs),
        Library(b, &c.get_package(), path, c.get_name()),
        soname(create_soname(c))
-{ }
+{
+       install_location = "lib";
+       if(comp.get_type()==Component::MODULE)
+       {
+               install_location += '/';
+               install_location += package->get_name();
+       }
+}
 
 string SharedLibrary::create_soname(const Component &c)
 {