Hi all,
How can we create a software package. So that after extracting our software tar ball user can do the typical steps:
$ gunzip < mycode.tar.gz | tar xvf -
$ ./configure
$ make
$ make install
Hi all,
How can we create a software package. So that after extracting our software tar ball user can do the typical steps:
$ gunzip < mycode.tar.gz | tar xvf -
$ ./configure
$ make
$ make install
Use autotools to create the configure script (which will generate the Makefile necessary for the last two steps), then make a tarball with all your code and stuff in it.
Look into the GNU autoconf/automake toolchain. Here's a free tutorial/book.
An alternative to the hard to understand GNU/Autools is CMake.
http://www.cmake.org/cmake/help/examples.html
e.g. KDE is using it.
In the old days, this process was done by hand. Each Makefile
was written by hand (the file make
uses as a sort of script). This became problematic when it came to portability, and so the configure
script was made. The ./configure
script was written by hand for each project as well. Eventually this was automated by GNU with their autotools
package. This consists of autoconf
, automake
, and a few others. While alternatives exist, particularly for make
, autotools
is most widely used. ...At least on GNU/Linux systems. Alternatives include the already mentioned CMake, Boost.Build, Boost.Jam, SCons, and more.