Alex Rivera | Logout

Which files generated by Autotools should I keep in version control repository?

Asked 2010-07-20T14:20:06.833
59

I am new to autotools and I am working on a C project. I want to add my project to a git repository. Which files generated by the autotools I need to track in my version control system and which should be ignored?

Edit
Report

1 Answer

13

Note: I agree with ptomato's answer, and leave this answer as Community Wiki.
It makes sense for source code distributions, but your project may not be one.
For development purpose, ptomato's answer makes more sense.


All the C projects generally come with a configure file able to generate the actual Makefile used for the compilation.

So when you consider the autotool chain, I would recommend versioning all files generated up to the configure file, as they are normally a one-time generation operation.

http://upload.wikimedia.org/wikipedia/commons/thumb/8/86/Autoconf.svg/309px-Autoconf.svg.png

That means anyone with a checked out copy of your version project can immediately start:

./configure
make
make install

So, while it is generally true, you shouldn't version any generated files, you could store those, especially if the other reader from that project can:

  • benefit from not re-generating those files (for an identical result)
  • start immediately to configure and compile.

What is ed in the above flow chart?!

The ed in the flow chart is likely a placeholder for the text editor used to modify or create the configure.ac and Makefile.am files.
In the context of Autotools, these files are written by a developer to specify the configuration and build instructions for the software. ed is actually one of the standard text editors in Unix and Unix-like systems and represents the concept of editing these files manually.

answered 2010-07-20T14:30:04.203

Your Answer