how to seperate project files from source files in different dirs?

Andreas Pakulat apaku at gmx.de
Wed Aug 1 17:43:58 BST 2007


On 01.08.07 15:05:28, JeDi wrote:
> On 8/1/07, Andreas Pakulat <apaku at gmx.de> wrote:
> > On 01.08.07 20:26:26, shizheng wrote:
> > > I'm new to kdevelop, so I just can't figure it out that project files
> > > and source files
> > > must be arranged in the same directory :( Could you please explain it to me?
> >
> > Its implemented like that, kdevelop will put 2 of its files into the
> > source directory and there's  no easy way to change that and also
> > probably nobody who wants to write the code for that.
> 
> I understand why someone would do this. We are a research company that
> write code that has to run on very different setups and architectures,
> most of them using different build environments. If all the project
> files of each build environment would sit in the source code
> directories, it would be a mess to manage.
> 
> We have a directory setup like this:
> - bin/win32_debug, bin/linux_debug, ... -> shared libraries and
> executables will be output to these paths
> - lib/win32_debug, lib/macos_release, ... -> link libraries for
> different platforms will be output to here if necessary
> - src -> source code (headers and source files), in a subdirectory per
> library/executable
> - buildenv/vs2005, buildenv/codeblocks, ... -> a subdirectory for each
> build environment. All project files and other build environment
> specific files reside here.
> 
> This way, we can easily manage our different build environments
> without having to clutter the source directory. In KDevelop, this is
> very hard to accomplish. Project files should contain files with
> relative paths to the directory where the project file sits.

I still fail to see the problem: If you copy around your project tree's
including the different build environment you're doing something wrong
anyway. If you use a revision control system you shouldn't check
any of the kdevelop specific files into it, thats just not supported.

Having said that: As far as I can see the only the .pcs file which
contains the parsed information from the project file is created in the
project's source dir. The .kdevelop file can sit anywhere and you can
change the projects source dir via Project Options->General. The
.kdevses file seems to be created in the same path as the .kdevelop
file. Which leaves the .filelist file, the position of that one can be
changed by editing the .kdevelop file (there's no GUI to change the path
for that) and setting the entry filelistdirectory under
kdevcustomproject to a different value. However I don't know if that
works, i.e. I have no idea what happens if projectsourcedir !=
filelistdirectory.

> This is probably a design mistake, and not very hard to live with if
> you only use kdevelop as build environment, but for a next major
> release like KDevelop 4, I would definitely support this. For us (and
> probably a lot more companies), this is the reason why we don't use
> kdevelop for many projects (we do use it for linux-only projects,
> because it is a great application).

Well, so far the .kdev4 file will end up in the same directory as the
project itself (at least there's no support yet for a different
directory for the project), however that file is supposed to be checked
into a version control system in KDevelop4. So it will contain only very
little information, like the type of buildsystem, the projects name and
eventually the version control system to use. If a projectmanagement
plugin needs a filelist to determine which files are project files, that
filelist will go into a hidden directory in the same path as the .kdev4
file. And that subdir is also not supposed to be shared among developers
or different systems.

Andreas

-- 
Tomorrow, you can be anywhere.




More information about the KDevelop mailing list