Author Topic: Autotools integration ?  (Read 12833 times)

Offline asmodehn

  • Single posting newcomer
  • *
  • Posts: 5
    • Asmodehn's Home Site
Autotools integration ?
« on: August 01, 2005, 12:06:45 pm »
Hello everyone,

I am using currently Devcpp to develop all my apps... I would like to change to Code::Blocks as I believe the plugin framework is really interesting to have really good thing I am waiting for, like the UML plugin or the cppunit plugin for instance :)

However, my major problem is that for the moment to develop cross-platform apps, I have to set up one thing for Windows (currently a devcpp project) and one more for Unix/linux (autoconf - automake) This make things hard to maintain.

As now Msys comes with autoconf and automake, I was wondering what is the best way to use autotools along with Code::Blocks... I'd rather havin no .cbp file and all default autotools needed file. I dont want the user to install Codeblock to build the sources from cvs if possible. Msys for windows, or the usual package for any Linux / BSD should be enough...

So what is the best solution ? writing a plugin to generate the files, but keep .cbp ? wait for a version of code::blocks that will get rid of cbp and work only on top of autotools ;) (I am dreaming of that ^^)
Anyway if someone can show me the way, that will be helpfull, as I plan to write a library with many dependencies, and I rather like to manage all those dependencies only in one place.
OH btw, I am not a guru of autotools at all, but I am looking for one ;)

Thank you very much,

darklordsatan

  • Guest
Re: Autotools integration ?
« Reply #1 on: August 01, 2005, 12:17:13 pm »
wait for a version of code::blocks that will get rid of cbp and work only on top of autotools ;) (I am dreaming of that ^^)
I think, yes. You see C::B is designed to work with many compiler suites, with different makefile formats, so I dont think thats possible, besides, I dont think many users would be happy.
Now, have you tried Compile->Export Makefile? It outputs a "normal" gcc makefile, that would be the one to be distributed to your developers instead of the cbp.

Now, totally OT, have you tried The autobook?

zieQ

  • Guest
Re: Autotools integration ?
« Reply #2 on: August 01, 2005, 01:12:21 pm »
You could use CMake, it generates platform/compiler specific project files (visual workspaces, makefiles, etc.). I have greatly improved the MSVC loader of Codeblocks so that CMake generated projects files import well. That's what I do myself  :)

Other folks have also suggested Scons or bakefiles...

Autotools are IMHO not a good option for windows users since they often must install a bunch of unix tools to get the things compiled. Sometimes they could not use their favorite compiler.
« Last Edit: August 01, 2005, 01:16:47 pm by zieQ »

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Re: Autotools integration ?
« Reply #3 on: August 01, 2005, 04:00:54 pm »
Yep, you should take a look at SCons, which is MUCH better than autotools, and furthermore, which is portable ;)

There was someone who was writing a SCons plugin I think (RShadow), I don't know whether it's useable or not...

Offline asmodehn

  • Single posting newcomer
  • *
  • Posts: 5
    • Asmodehn's Home Site
Re: Autotools integration ?
« Reply #4 on: August 02, 2005, 07:20:52 am »
Thank you everyone for the replies.

Yes I had a look at the autobook, and I have written some M4 code, but I am still looking for an easy way to do that as I still dont feel really easy using it.

And I dont want to start a troll here, but I had a look at many build systems (Scons, CMake, nant, etc. ) and I think the autotools are the more broadcasted build utilities around, because I am using some different flavour of BSD, Linux, and windows, and I can find autotools in every of my packages system..., even in MSYS :-)
That is why I want to keep using that.

My problem is not only building my project, but find out which library are installed, where,  and build my project with the right options... even If I keep using the same compiler all the time (gcc)

So it looks like I may need to write a plugin to generate the autotools files and to start a new project only by reading those files... someday ^^ when I become an autotools and C::B poweruser  :lol:   Hard work I guess...

Thank you again for the help.

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Re: Autotools integration ?
« Reply #5 on: August 02, 2005, 02:49:43 pm »
GCC is called by make.
A Makefile is created by the autotools, each autotool creating files used by other autotools.
You want to make an "autofiles" generator.

I think all of this is really too much complicated, when we see that SCons can use more compilers than the autotools and as many platforms, since it is written in Python.
Furthermore, the Python syntax is much more clear than M4's, and SCons replaces autotools AND Makefiles.

It's not because the autotools and the most widespread build utilities that they constitute the best choice...

Offline kagerato

  • Multiple posting newcomer
  • *
  • Posts: 56
    • kagerato.net
Re: Autotools integration ?
« Reply #6 on: August 02, 2005, 06:23:01 pm »
I think all of this is really too much complicated (...omission...)

It's not because the autotools and the most widespread build utilities that they constitute the best choice...

Agreed.  Popularity should not dictate the choice of build tool.

While the autotools probably seemed like a nifty idea when they were first created, these days they're a pretty inelegant solution.