Autotools:config.guess、depcomp 或 ltmain.sh 是否应该存储在 SVN 存储库中?
我正在接管一个项目,我在 subversion 存储库中看到一些属于 libtool 和 automake 发行版的文件,例如 config.guess、depcomp 或 ltmain.sh。我相信这完全是错误的,因为当我进行检查时,我应该在我的机器上安装自动工具并进行自动重新配置。
你怎么认为 ? 我是否错过了将这些文件放在存储库中的意义?
I am taking over a project and I see in the subversion repository some files that belong to the distribution of libtool and automake such as config.guess, depcomp or ltmain.sh. I believe this is simply wrong because when I do the check out, I should have the autotools installed on my machine and do an autoreconf.
What do you think ?
Am I missing the point of having these files in the repository ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
通常,您的 SVN 存储库中不会有这些内容。通常您有一个
autogen.sh
可以根据需要重新创建它。您不存储可能过时的文件的本能是一种好的本能。如果有人对configure.ac
提交了更改,而其他人使用configure
检查了整个内容,则更改不会产生影响。Typically, you wouldn't have those in your SVN repo. Usually you have an
autogen.sh
that recreates it on demand. Your instinct to not store potentially-stale files is a good one. If somebody commits a change toconfigure.ac
, and somebody else checks out the whole thing with theconfigure
, the change won't matter.几乎任何可以生成的东西(以及 depcomp 等)都不应该成为跟踪源存储库的一部分。
Almost anything that can be generated - and depcomp, etc. belong to that - should not be part of a tracked source repository.
纯粹的理论是,您不应该将可以重新生成的文件放入版本控制中。由于您可以使用 autoreconf -i 或类似方法重新创建这些文件,因此这适用于本例。
很多人仍然这样做的原因(可能除了无知之外)是因为这会给开发人员带来巨大的额外负担。比如说,如果您有一个更大的开源项目,有数十名开发人员和数百名感兴趣的追随者,那么每个人都会安装不同版本的 autoconf、automake、libtool、autopoint 等。在简单的情况下,这应该没有什么区别。实际上,确实如此,这可能会带来严重的麻烦并拒绝潜在的项目贡献者。
因此,作为一种实际的妥协,由于这些文件实际上很少改变,如果您有一个非常复杂的设置,您无论如何都可以签入它们。
The pure theory is that you shouldn't put files that you can regenerate into version control. Since you can recreate these files using
autoreconf -i
or similar, that applies in this case.The reason why a lot of people still do it (besides ignorance, possibly) is that this can create a significant additional burden on the developers. If, say, you have a larger open-source project with dozens of developers and hundreds of interested followers, everyone will have a different version of autoconf, automake, libtool, autopoint, etc. installed. In simple cases, that shouldn't make a difference. In practice, it does, and this can create major headaches and turn away potential project contributors.
So, as a practical compromise, since these files actually change very rarely, if you have a very complex setup, you may just check them in anyway.