I know, it must be a silly question.
Assume I have a library using an autotools build system.
I have all that configure
, configure.ac
, Makefile.am
, config.h
and may other files in my project root folder. Some of them wre written by a developer, others are generated by autotools.
The question is: if I use a version control system (in my case - hg) - which of all that autotools files should be tracked by a VCS and which shouldn't (hgignore'd)?
Thanks, Serge
I think the best procedure is to only put files under version control that are not generated - people working with the VCS are developers and should have the autotools installed on their machines, checking in generated files will only cause trouble for them.
On the other hand you have to make sure that source-level distribution is done with all generated files in place, so that non-developers are able to build the software without the autotools installed.
There are two schools of thought on this:
I generally fall into the latter group personally, but the former can be nice if there are/were problems with the build system in some specific version that you probably don't have installed any more.
In your example configure
and config.h
are both (probably) autogenerated, so if you're going to include them in version control I'd be inclined to include the Makefile.in
s too.
In my projects this usually means having no more autotools related files than configure.ac
, Makefile.am
, the documentation if it's GNU and a directory called m4
which includes any custom/non-standard macros my configure.ac requires.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With