Re: [anjuta-list] [anjuta-devel] Add new target



Hi, Sebastien,

On Wed, Aug 10, 2016 at 10:48 AM, Sébastien Granjoux <seb sfo free fr> wrote:
Hi Igor,


Le 08/08/2016 22:09, Igor Korot a écrit :

When I create a project, add the source and header files and do the
build it will
generate configure and all necessary files to compile just one target.


No the configure script generate make file to compile all your targets. Then
you can build one (Build -> Build _target_) or all your targets (Build ->
Build project) in the GUI.

Are you saying that configure script is generated when the project is created?
And not when the _first_ build is initiated?


When you add the dynamic-link library, you will need to set properties for
the
newly added target in order for this target to compile. (This is not so
obvious
but OK).


Yes but I think it's quite normal that you need to define which source files
are used in your library.

I'm not talking about source/header files here.
I'm using wxWidgets, and so for every added library I have to set its
C++ and Linker Options
using wx-config.

Is it the same for native GTK+ application using Anjuta? That you need
to set properties for
every .so file with pkg-config?



Now, you put all this into the Git/CVS/etc. So that you configure script
and 2+
Makefiles are properly maintained.


You shouldn't put on your version control system, the configure script nor
the Makefile because they are generated in the configure step. You need to
put the configure.ac file and all Makefile.am.

What about Makefile.in? Is it also regenerated every time?



So when you add new build target - what happened? I will still have to do
"configure" and then "build", right?


Normally the Makefile are generated in a way that they automatically run
configure when you change the Makefile.am file. But basically, you need to
run both configure for your project and build for all your targets.


But then when you run "configure"
the Makefile
that waqqs made previously will be overwritten. Will the new build
target be added
to the resulting Makefile or the resulting Makefile will contain just
one target?


No,the Makefile will be overwritten but they normally contains all targets
unless to explicitly remove some of them in your configure script. By
example if you add an option to the configure script to generate only static
libraries.


And what happens with the DLL Makefile? Will it contain 1 target or 2
targets?


Normally 2.


Because if the new Makefile will have 1 build target then pushing the
changes into
the version control is not good, since in my situation on the second
machine I will
need to change it to reflect the build target of the machine #2.


I understand, but you shouldn't push the Makefile anyway, only Makefile.am.

Well Makefie.am is still a Makefile, right?

Thank you.

P.S.: BTW, where is the configure line stored? The one I see in the
"Build->Configure Project..."
dialog?



Regards,

Sébastien


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]