Question

I have started recently to work with automake and autoconf and I am a little confused about how to distribute the code.

Usually when I get a code that works with a configure file, the only thing that I get is a confiure file and the code itself with the Makefile.am and so on. Usually I do

./configure
make
sudo make install

and thats all but when I generate my configure from a configure.ac file it toss out lots of files that I thought where just temporary but if I give the code to a partner and he makes configure, it doesn't work, it needs either remake the autoreconf or have all this files (namely instal.sh,config.sub...).

Is there something that I am missing? How can I distribute the code easily and clean? I have searched a lot but I think I am searching for the right thing because I cannot find anything useful.

Thanks a lot in advance!

Était-ce utile?

La solution

Automake provides a make dist target. This automatically creates a .tar.gz from your project. This archive is set up in such a way that the recipient can simply extract it and run the usual ./configure && make && make install invocation.

It is generally not recommended to check the files generated by Autotools into your repository. This is because they are derived objects. You wouldn't check in your .o files!

Usually, it is a good idea to provide a autogen.sh script that carries out any actions required to re-create the Autotools build infrastructure in a new version control system checkout. Often, it can be as simple as:

#!/bin/sh
autoreconf -i

Then set it chmod +x, and the instructions for compiling from a clean checkout can be ./autogen.sh && ./configure && make.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top