BoatX
BoatX

Reputation: 173

Should Autotools output scripts and Makefiles be included in a repository?

I'm using Autotools in my project and I want to use version control.

Is it good idea to add the configure scripts and all the stuff generated by autoconf and automake (excluding symbolic links) to the repository, or simply stick only with the source files, Makefile.am, and configure.ac?

Upvotes: 3

Views: 644

Answers (2)

Manav Kataria
Manav Kataria

Reputation: 5320

As a thumb-rule, its best to NOT include generated files as it hampers portability.

For example: You uploaded files for your PC (PC1) having PATH configuration stored in them. Your collaborator downloaded your generated files to run on another computer PC2 but couldn't as the generated files pointed to a different PATH which did not exist in PC2.

However, you may add the generated files to version control when you need to archive outputs and you don't have a dedicated backup server. If you know what you're doing and have a good reason to do so, you're fine.

Hope this helps!

Upvotes: 3

ldav1s
ldav1s

Reputation: 16315

I would only commit into revision control what is called in GPL v3 legalese the corresponding source, and try and get it as small as possible. I never commit configure et al. when I can.

Portability isn't really the issue, since the autotools are meant to assist portability. At any rate, you can always blow away autotools generated files like configure and replace them with ones that work for you. The issue is that (when comitted) these files will have a strong tendency to become conflicted and otherwise show change activity when nothing has really changed.

Upvotes: 2

Related Questions