Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Make Target View "Use default" checkbox in build command does not behave as expected

Hi Nayna,

And if so then isn't the Checkbox in Make Target should be labelled as "Use
build command from Project Properties"
I have seen this behaviour while using Eclipse CDT 4. Then I also checked
it in CDT 5. And it still behaves the same way.

You may want to check out also CDT 6.0. The label was changed to "Use builder settings". Is this what you are asking for?

The idea behind that checkbox is that "Make Target" in Make Targets View represents a make target from makefile and build command represents "make" program. Typically a user who would change build command would change it to some other make program, for example "gmake" or "ssh remote-box 'make " etc. And make targets from MTV should work with it without extra-setup. A user would uncheck the checkbox if they want to run arbitrary command not associated with the builder.

Andrew

On Wed, Jul 22, 2009 at 4:26 PM, Nayna Jain <naynjain@xxxxxxxxxx> wrote:
Hi all,

I created a C/C++ project.
I am using Make Targets for the build. Following is the observation.

let us assume there there is a Make Target created with default settings.
Default settings are as follows :
Project Properties -> C/C++ Build -> Builder Settings has "Use default
command" checkbox enabled. And so Build is supposed to use default command
defined for the builder.
Make Target created takes these default settings has "Use default command"
checkbox enabled and so when build is done, it uses the default command for
particular target.

Now , with the following steps done, observation is as follows :

1. Right click on Project Name in Explorer, Go To Properties -> C/C++Build
-> Builder Settings. Uncheck the "use default command" checkbox. Update the
build command to "/bin/ls". This gets updated in .project file
Now, go to your created Make target. Double click on it or Right Click ->
Build make target. And it now executes "/bin/ls". Make Targets are stored
in .cproject file.

2. Right Click on make target -> Edit Make Target, Uncheck the default use
command box. Enter the build command as /bin/pwd. Update it. And now it
runs as the "/bin/pwd". This command gets updated in .cproject file also.

3. Go to Project Properties -> C/C++ Build-> Builder Settings. And again
enable the checkbox to use default build command.
Now go to make target, Edit Make Target, Enable checkbox to use default
build command and now it again executes the default build command taken
from .project.


So, it seems that whenever the "Use default command" checkbox is enabled ,
it reads from .project file i.e. Project Properties settings.
And whenever checkbox is not enabled, it reads directly from .cproject
<buildTargets> tag.

And thus, for Make Target , "Use default command" means to use whatever is
defined in Project Properties irrespectiv of "use default command" is true
or false in project properties. And does not use always the default command
as defined in builder extension in Plugin.xml file.

Is it a bug ? or is it how the CDT Make Target is designed to work
intentionally. And if so why is it defined like this ?

And if so then isn't the Checkbox in Make Target should be labelled as "Use
build command from Project Properties"

I have seen this behaviour while using Eclipse CDT 4. Then I also checked
it in CDT 5. And it still behaves the same way.

Thanks & Regards,
   - Nayna Jain

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top