Originally Posted by
hosseinyounesi
Well, how can make configure and makefile files? I'm now using KDEVELOP, it makes these files but there is a problem: automake versions conflict or is not compatible
I solved this problem by using autoreconf -fvi
Other IDEs in Linux don't do this
Any EASY way to do this? Or wayS?
I don't use an IDE (and I don't program C++) so... Anyway I've only done the whole autotools routine a few times, with things that I actually distributed (and it worked). Here's my notes:
Code:
need:
Makefile.am for each dir
/configure.ac (could use autoscan)
then in order:
aclocal
automake -ac
autoheader
automake -ac again
autoconf
the actual commands are in bold. The reason for the second automake is that you need to run it before autoheader, but you need the file produced by autoheader (config.h.in) to do the automake properly.
The only manual work is writing the Makefile.am and configure.ac files. Here are the two links I used and bookmarked:
Introduction to GNU Build Tools (automake, autoconf, and configure Script)
GNU Automake By Example
Plus a little bit reading the man pages. When you're done you have a directory like this:
Code:
aclocal.m4
autom4te.cache
compile
configure
COPYING
install-sh
Makefile.in
NEWS
src/
AUTHORS
ChangeLog
config.h.in
configure.ac
depcomp
INSTALL
Makefile.am
missing
Most of which autotools does. src/ contains the .c and .h files and another Makefile.am, and the file produced by automake from it, Makefile.in. If you've ever downloaded a source packaged and compiled it this should be familiar (if not, find something and try it, it's easy). Now the end user just unzips the tar ball and types:
./configure
make
make install
And maybe gets to watch gcc doing strange things for a minute. The Makefile can contain instructions for installing various components, like documentation, images, etc. in the right places in the filesystem.