Autotools C++ projects: Best practices [message #251410] |
Wed, 12 March 2008 11:00  |
Eclipse User |
|
|
|
Originally posted by: scvalmei.graaph.arq.br
Hi, I'm new to Eclipse.
I want to learn about fitting an existing project into the Eclipse
framework. This is a C++ shared library based on Autotools, and it has a
samples directory with a binary application inside too, something like
that:
app/
app/configure.ac
app/Makefile.am
app/include/
app/include/app/
app/include/app/lib_header.h
app/src/
app/src/Makefile.am
app/src/core/
app/src/core/Makefile.am
app/src/core/lib_source.cc
app/samples/
app/samples/Makefile.am
app/samples/sample_source.cc
The original autotools settings (relative paths) are not compatible with
Eclipse Build/Debug directories layout, so one or the other will change,
or both. I prefer if Eclipse changes, but don't know whether that's a good
idea.
What are good ways to work with a project like this in Eclipse? I don't
want it depends on Eclipse, so I still can check it out from CVS and work
in it using emacs and commit it into CVS again.
That seems reasonable and and straightforward as well. But have it to work
is been a pain so I would appreciate to hear from your experience.
|
|
|
Re: Autotools C++ projects: Best practices [message #251468 is a reply to message #251410] |
Thu, 13 March 2008 06:52   |
Eclipse User |
|
|
|
Silvio Almeida wrote:
> Hi, I'm new to Eclipse.
>
> I want to learn about fitting an existing project into the Eclipse
> framework. This is a C++ shared library based on Autotools, and it has a
> samples directory with a binary application inside too, something like
> that:
>
> app/
> app/configure.ac
> app/Makefile.am
> app/include/
> app/include/app/
> app/include/app/lib_header.h
> app/src/
> app/src/Makefile.am
> app/src/core/
> app/src/core/Makefile.am
> app/src/core/lib_source.cc
> app/samples/
> app/samples/Makefile.am
> app/samples/sample_source.cc
>
> The original autotools settings (relative paths) are not compatible with
> Eclipse Build/Debug directories layout, so one or the other will change,
> or both. I prefer if Eclipse changes, but don't know whether that's a
> good idea.
>
> What are good ways to work with a project like this in Eclipse? I don't
> want it depends on Eclipse, so I still can check it out from CVS and
> work in it using emacs and commit it into CVS again.
>
> That seems reasonable and and straightforward as well. But have it to
> work is been a pain so I would appreciate to hear from your experience.
>
Eclipse CDT distinguishes two types of build: managed and unmanaged.
The managed build will create makefiles for you and dictates the layout
of the output folders.
The unmanaged build assumes you create and manage you makefiles on your
own and it does not imply a specific directory layout.
An autotools based project is certainly of the second kind (unmanaged).
In the project creation wizard, this type of project is called 'Makefile
Project' (assuming CDT >= 4.0).
BTW, there is also an autotools plug-in which might be helpful:
http://sourceware.org/eclipse/autotools/
I haven't tested it myself, though.
HTH
--
Anton Leherbauer
Wind River CDT Team, Austria
|
|
|
Re: Autotools C++ projects: Best practices [message #251687 is a reply to message #251468] |
Sun, 16 March 2008 15:37  |
Eclipse User |
|
|
|
Originally posted by: scvalmei.graaph.arq.br
Hi Anton,
Indeed, it was straightforward to setup the project once I started it as
an unmanaged "Makefile Project".
My first intention was to give autotools plug-in a try so I could report
my impressions on both methods, but for some reason autotools plug-in is
not available from http://sourceware.org/eclipse/update anymore.
That's ok as my time is finished. Anyway, features of autotools plug-in
looks attractive and I think it is worth to try, but I am pretty happy
without it now.
Thank you.
|
|
|
Powered by
FUDForum. Page generated in 0.07999 seconds