将autoconf项目的哪些文件放入.gitignore?

时间:2013-05-06 17:36:10

标签: c++ git makefile autoconf

我们的git-managed项目中包含ctemplate库,该库基于GNU Autoconf

我想将Autoconf生成的所有内容放入.gitignore文件中,以避免在有人意外提交其特定于平台的生成文件时发生冲突。

有人能告诉我如何找出autoconf为所有平台(Mac,Ubuntu,CentOS等)生成/修改的完整文件列表吗?

1 个答案:

答案 0 :(得分:14)

以下是我在各种.gitignore(关于Debian测试)中的内容:

共享库:(libtool)

/Makefile
/Makefile.in
/aclocal.m4
/autom4te.cache/
/config.*
/configure
/depcomp
/install-sh
/libtool
/ltmain.sh
/m4/
/missing
/stamp-h?
.deps/
.dirstamp
.libs/
*.l[ao]
*~

<强>可执行文件:

/Makefile
/Makefile.in
/aclocal.m4
/autom4te.cache/
/config.*
/configure
/m4/
/stamp-h?
.deps/
.dirstamp
*.o
*~

你可能想稍微调整一下,但这是其中的一小部分。 make dist-clean然后提交,重建,最后git status可能会显示新文件,具体取决于您的构建产生的确切内容。