Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Autotools tips from package maintainers...?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
CoderMan
Apprentice
Apprentice


Joined: 10 Aug 2009
Posts: 173

PostPosted: Mon Dec 21, 2009 5:23 pm    Post subject: Autotools tips from package maintainers...? Reply with quote

Hi. I'm working on my first possibly influential FOSS program (in c++). I just learned autotools (heaven help me) and I am trying to set up everything properly. I hope to eventually submit my project to Gentoo, and I want to make things as easy as possibly for them down the road. I was just curious if any package maintainers happen to have written a blog post or some such document enumerating tips or suggestions on proper autotools setup.
_________________
Like computers but don't like programming? Then you missed the whole point.
frigidcode.com
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Mon Dec 21, 2009 5:43 pm    Post subject: Re: Autotools tips from package maintainers...? Reply with quote

CoderMan wrote:
Hi. I'm working on my first possibly influential FOSS program (in c++). I just learned autotools (heaven help me) and I am trying to set up everything properly. I hope to eventually submit my project to Gentoo, and I want to make things as easy as possibly for them down the road. I was just curious if any package maintainers happen to have written a blog post or some such document enumerating tips or suggestions on proper autotools setup.
Personally, I have found it to be most simple to use an IDE that generates the autoconf/makefile information.

If you are working on a graphical application, glade does a good job at generating what you need. A command-line application would be better built using anjuta or kdevelop.

I always code using a terminal and vi, but for the initial setup using the IDE really makes things easier.
Back to top
View user's profile Send private message
few
Guru
Guru


Joined: 03 Mar 2008
Posts: 448

PostPosted: Mon Dec 21, 2009 5:44 pm    Post subject: Reply with quote

Maybe [1], but I have no idea myself.

[1] http://www.flameeyes.eu/autotools-mythbuster/
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6196

PostPosted: Mon Dec 21, 2009 5:56 pm    Post subject: Reply with quote

As I (and other people) repeatedly stated kdevelop is a VERY poor choice
for an autotools project.
Back to top
View user's profile Send private message
CoderMan
Apprentice
Apprentice


Joined: 10 Aug 2009
Posts: 173

PostPosted: Mon Dec 21, 2009 6:24 pm    Post subject: Re: Autotools tips from package maintainers...? Reply with quote

mikegpitt wrote:
CoderMan wrote:
Hi. I'm working on my first possibly influential FOSS program (in c++). I just learned autotools (heaven help me) and I am trying to set up everything properly. I hope to eventually submit my project to Gentoo, and I want to make things as easy as possibly for them down the road. I was just curious if any package maintainers happen to have written a blog post or some such document enumerating tips or suggestions on proper autotools setup.
Personally, I have found it to be most simple to use an IDE that generates the autoconf/makefile information.

If you are working on a graphical application, glade does a good job at generating what you need. A command-line application would be better built using anjuta or kdevelop.

I always code using a terminal and vi, but for the initial setup using the IDE really makes things easier.


Thanks for the suggestion, but to be honest I've been using Emacs since I learned how to write "#!/usr/bin/perl" in a terminal years ago. I don't think I could handle working inside a GUI IDE. It's sort of a religious thing now.

I actually have set up the core autoconf/automake files, but I am looking more for suggestions on how to tweak it.
_________________
Like computers but don't like programming? Then you missed the whole point.
frigidcode.com
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Mon Dec 21, 2009 6:28 pm    Post subject: Re: Autotools tips from package maintainers...? Reply with quote

CoderMan wrote:
Thanks for the suggestion, but to be honest I've been using Emacs since I learned how to write "#!/usr/bin/perl" in a terminal years ago. I don't think I could handle working inside a GUI IDE. It's sort of a religious thing now.


That's why I wrote this :wink:
mikegpitt wrote:
I always code using a terminal and vi, but for the initial setup using the IDE really makes things easier.

I hate using IDE's as well... use it to set up your build environment, and then use the command line and your editor of choice thereafter.
Back to top
View user's profile Send private message
SamuliSuominen
Retired Dev
Retired Dev


Joined: 30 Sep 2005
Posts: 2133
Location: Finland

PostPosted: Mon Dec 21, 2009 6:33 pm    Post subject: Reply with quote

VoidMage wrote:
As I (and other people) repeatedly stated kdevelop is a VERY poor choice
for an autotools project.


Yep, whatever you do, don't even consider kdevelop for autotools based projects...
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Mon Dec 21, 2009 6:47 pm    Post subject: Reply with quote

ssuominen wrote:
VoidMage wrote:
As I (and other people) repeatedly stated kdevelop is a VERY poor choice
for an autotools project.


Yep, whatever you do, don't even consider kdevelop for autotools based projects...
I've personally not used kdevelop for a significant project before. Why is it a bad choice? Just curious...
Back to top
View user's profile Send private message
SamuliSuominen
Retired Dev
Retired Dev


Joined: 30 Sep 2005
Posts: 2133
Location: Finland

PostPosted: Mon Dec 21, 2009 6:56 pm    Post subject: Reply with quote

mikegpitt wrote:
ssuominen wrote:
VoidMage wrote:
As I (and other people) repeatedly stated kdevelop is a VERY poor choice
for an autotools project.


Yep, whatever you do, don't even consider kdevelop for autotools based projects...
I've personally not used kdevelop for a significant project before. Why is it a bad choice? Just curious...


Well, for one, KDevelop-4 betas don't have autotools support yet, only cmake.
And KDevelop-3 generates invalid autotools build-system, incompatible with autoconf-2.64 and above, so it won't even work... at least in a future-proof way.
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Mon Dec 21, 2009 7:36 pm    Post subject: Reply with quote

I think the above mentioned autotools mythbuster is extremely good. For a project which should go to gentoo you should in particular observe the warning in Section 3.1. The only criticism which I have there are code snippets like
Code:
AS_IF([test "x$enable_bar" = "xyes"],  ...
which should cleaner be
Code:
AS_VAR_IF([enable_bar], [yes], [...]
but this might require a rather current autoconf version. Anyway, I would recommend to use the newest automake/autconf because their info-files are meanwhile also rather good; and in case you use code from somewhere else you should make sure to check that its macros are not listed in the obsolete section of the newest versions...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum