Question

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?

Was it helpful?

Solution 2

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.

OTHER TIPS

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!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top