[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] make target question
|
>
> Can someone explain the purpose behind the "Make Target"'s view? Is it
> essentially to tell the builder where to start the build process?
> (i.e., where to pick up the default Makefile when executing "make"?).
>
Yes, it is to permit to let you start a build at specific folder.
Eclipse default builders always start from the Project location.
> When I first tried the CDT, I expected the "make target" to be used as a
> make target (you can probably see why I might be confused).
>
To do that you have to "add a Target", in the context menu
(There is a problem once you add a target say "install", you have to
"refresh") then by double-clicking on it(the "install" node), it should
invoke the default builder at the folder with the target:
cd project/folder; make install
> Right-clicking on a make target named "hello" and then selecing "Build",
> I fully expected to see something like "make -k hello", but instead I
> see "make -k clean all" in the C-Build View. The former would actually
> be a way of using the built-in make rules to build a target when no
> makefile exists.
See above, right click "add the target", "refresh" and double-click
on the target you created. By clicking on the folder hello, it
uses the default build targets, which is "clean all"
> For instance, I could create a new "hello" project, create a simple
> hello.c source file, use the default "hello" make target provided by the
> CDT, and then select "Build". No makefile generation necessary, since
> building "hello" from "hello.c" is already part of the default make rules.
>
Yes, we never really went far with the "Make target view", since there
was no clear direction on what the default CDT builder would be.
Once this is done, I do not think this view will survive, at least
not how it is. And some of the functionnalities is already
in the "C/C++ Project view".
> I also noticed I can't seem to tell the CDT not to include the word
> "all" in my custom build commands. In other words, modifying the
> properties for the "hello" project, and setting the build command to
> "make -k hello" results in a "make -k hello all" reflected in the
> C-Build view. Make complains about the "all" target, since I have no
> makefile.
I do not see this,
-> go in the C/C++ projects view
-> choose context menu "add make targets"
-> a dialog field will pop
-> put 'hello' in the textfield(whithout the quotes)
-> choose context menu "Make" in the C/C++ project view
-> the target "hello" should appear
-> you should see in the C-Build "make -k hello"
You can remove the "-k" in the properties of the project
in the Build Setting tab.
>
> Am I just wasting my time here, or is it worth trying to use make's
> build-in target rules for simple projects?
>
Not sure, what you meant however, there is on going discussion about the
default CDT build, you are welcome to provide feedbacks and source code.