getSubDir vs. getProjectDir

Falk Brettschneider gigafalk at yahoo.com
Sat Oct 28 16:51:28 UTC 2000


Hi,

Ralf Nolden wrote:

> Bernd Gehrmann wrote:
>
> > Actually, this is a convention which was established centuries
> > before autoconf was invented ;-)

A convention for the KDE world. But KDevelop supports Customer projects as
well and it should also run for the rest of the world.

>
> >
> ;-) well, yes, but we´re using autoconf ;-)
> I could however add a check for a Makefile in the base dir and if there
> is none, look for one in getProjectDir()+getSubDir(),

This would possibly be the solution.

> the other solution
> however was buggy. I worked on kdevelop within kdevelop, started it and
> loaded an example program. Then I did make clean in that example program
> and what actually happened was a make clean in my kdevelop tree so I had
> to recompile everything...

Strange. ???
getSubDir() is only a subtree of getProjectDir(). The common structure
accepted by KDevelop is at present:

--projectXYZ (this is getProjectDir(), containing just project files and
temp. stuff)
    +
    |
    +--projectXYZ (this is getSubDir(), containing all .cpp and .h files)

Did you create your example application within the kdevelop source tree?

Well, next strange thing:
Why do you want to run make clean in your root project directory although
it doesn't contain any temp. object files or moc files?
Can you give me an answer for this?
All that stuff that are cleaned by the call is located in the subdir.

Additionally, let me show you my complete structure of customer Qt
projects:

--metaproject (containing just all .kdevprj files and a meta Makefile
generated
    +          by tmake which simply calls make in each subproject.)
    |     a.kdevprj
    |     b.kdevprj
    |     c.kdevprj
    |
    +--a  (customer project (Qt) called 'a')
    |  +   contains: Makefile generated from .pro file
    |  |
    |  +--src
    |  |
    |  +--include
    |
    +--b  (customer project (Qt) called 'b')
    |  +   contains: Makefile generated from .pro file
    |  |
    |  +--src
    |  |
    |  +--include
    |
    +--c  (customer project (Qt) called 'c')
       +   contains: Makefile generated from .pro file
       |
       +--src
       |
       +--include


Well, it's somehow a hacky workaround for the fact that KDevelop-1.2 cannot
handle many projects in one workspace.
But anyway, it works fine. :-)
The bad thing is that your change to getProjectDir() in 'Make clean' causes
a make clean for _all_ my projects because the meta-Makefile is called.
My first implementation with getSubDir() called only 'Make clean' in
project a or b or c, depending on what .kdevprj is loaded.

Now you have implemented a switch... Does it search for a file called
Makefile? Then it will still find my meta-Makefile and will still call make
clean in all sub projects. That would be very uncool.
Anyway according to make and Execute I still vote for a make clean only in
the source subdirectory.

...I will check the current version with your switch solution...
...stay tuned.


Bye,
  F at lk




_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com





More information about the KDevelop-devel mailing list