]> git.tdb.fi Git - builder.git/blobdiff - source/objectfile.cpp
Create a directory structure for generated source files
[builder.git] / source / objectfile.cpp
index 1e6cb232135ca489aeeacd2045d86168394b0098..8196ef7f2c39ac5d1c2da5d3f4c998debcde7484 100644 (file)
@@ -21,7 +21,7 @@ ObjectFile::ObjectFile(Builder &b, const Component &c, SourceFile &s):
 FS::Path ObjectFile::generate_target_path(const Component &comp, const FS::Path &src)
 {
        const SourcePackage &pkg = comp.get_package();
-       FS::Path temp_dir = pkg.get_temp_directory()/comp.get_name();
+       FS::Path temp_dir = pkg.get_temp_directory();
        FS::Path rel_src;
        if(FS::descendant_depth(src, temp_dir)>=0)
                rel_src = FS::relative(src, temp_dir);
@@ -36,7 +36,7 @@ FS::Path ObjectFile::generate_target_path(const Component &comp, const FS::Path
                        fn += *i;
        }
        const Architecture &arch = comp.get_package().get_builder().get_current_arch();
-       return temp_dir/arch.create_filename<ObjectFile>(FS::basepart(fn));
+       return temp_dir/comp.get_name()/arch.create_filename<ObjectFile>(FS::basepart(fn));
 }
 
 void ObjectFile::set_used_in_shared_library(bool u)