10

我们的 git 管理项目中包含ctemplate库,它基于GNU Autoconf

如果有人不小心提交了特定于平台的生成文件,我想将 Autoconf 生成的所有内容放入 .gitignore 文件中以避免冲突。

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

4

1 回答 1

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可能会向您显示新文件,具体取决于您的构建生成的确切内容。

于 2013-05-06T17:44:21.547 回答