Make target settings are behavior incompatible

Andras Mantia amantia at kde.org
Sat Jan 6 17:44:54 UTC 2007


On Saturday 06 January 2007 17:55, Andreas Pakulat wrote:
> On 06.01.07 17:33:32, Andras Mantia wrote:
> >  Since the changes in the make/run target handling, things got
> > broken if you load an old project. The bugs I noticed:
> > 1) on loading, the "Main Program" setting is unticked in the Run
> > Options dialog, which means that now the "Execut Program" doesn't
> > build and run the main program. This is behavioral incompatible,
> > I'd suggest to use Main Program by default when loading old
> > projects.
>
> For Automake and QMake projects that is by purpose. The reason is
> that those provide the main program via their active target and
> building+executing that should work. Else the AM or QM is broken.

I don't understand this. If I never had an active target, but just a 
main program in the project why is it suddenly not compiled? I don't 
care if this option gets disabled as soon as you define an active 
target, but if you don't, this should not be touched.

> > 2) This is the more serious one. Until now the Executable (in Run
> > options) was a relative path to the build directory (or Working
> > Directory as it is called now). Now instead of that one, the
> > Executable line is appended to the *source* directory, which is
> > again not how it worked before and I consider to be plain wrong.
>
> You can specify the Working directory in which the launch should be
> done via the active target's option dialog.

Again, what if I don't use any active target? What you say results in 
fact that every time an active target MUST be defined and than this 
Main program setting is just superfluous and must be removed.
Also in that case the Build Project action should be removed and 
replaced with the Build Active Project.

>
> > Furthermore the file dialog for the Executable line starts from my
> > home directory instead of the Working Directory (or even the source
> > dir).
>
> The file dialog normally starts from the build directory of your
> project. 
No. :-) Configure options-Build 
directory: /data/development/build/kde-3.5/kdewebdev
The file dialog for the Executable line starts from $HOME.

> It uses the project managers buildDirectory() value, 
> whatever the project manager returns for that.

Something is broken than...

> > As of now, I have to specify the full path to the exeuctable, which
> > is incovenient and introduce another local specific setting for no
> > good reason.
>
> The reason is simply that what we had before was
>
> a) confusing to new users and myself

Now it is confusing for old users. ;-)

> b) didn't work properly with all project managers
> c) spread the settings over different pages in the Ui
> d) didn't work properly in the project manager it was designer for,
> i.e. automake.

See the first part. Now it is *really* confusing, especially why it 
tries to start from the source directory.

My assumption of how it should work is:

1) if Main program is activated in the project and Executable is a 
relative path, the path is appended to the build directory, F8 (Build 
Project) builds and runs this executable, and runs from the 
bulddir+executable. I'm fine with setting the work directory to 
whatever it points (the default is the starting path). The file dialog 
chooser for executable should start from the buld directory.
F7 (Build Active Target) builds the configured active target if exists, 
and acts as F8 as there is no active target (or gives an error). Run - 
runs the main program if set and activated or runs the active target 
(what if the target is a library?).

2) if there is no main program specified or this setting is not 
activated:
F8 - gives an error
F7 - builds the active target
Run - runs the active target

This would be logical, just running the active target is not that clear, 
if this is not an executable. Think about developing a complex 
application, like KDevelop, when you might make the active target a 
library you work on, still to test it you want to execute the main 
program, not the active target.

Andras
-- 
Quanta Plus developer - http://quanta.kdewebdev.org
K Desktop Environment - http://www.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20070106/58b621ff/attachment.sig>


More information about the KDevelop-devel mailing list