2013-05-06 42 views
8

我們有我們的git-managed項目中包含的ctemplate庫,它基於GNU Autoconf要放入.gitignore的autoconf項目的哪些文件?

我想將Autoconf生成的所有內容放入.gitignore文件中,以避免有人意外提交其特定於平臺的生成文件時發生衝突。

有人能告訴我如何弄清autoconf爲所有平臺(Mac,Ubuntu,CentOS等)生成/修改的完整文件列表嗎?

+0

不是一個解決問題的答案 - 不是我......但是,它看起來非常微不足道:1)從您編寫和提交它們的文件開始,2)運行'autoconf'並查看現在存在的文件 - autoconf生成的任何新東西 - 將這些添加到'.gitignore' ... – twalberg 2013-05-06 18:00:59

+0

這可能適用於本地機器,但autoconf也可以僅在特定平臺上生成東西。 – Korbi 2013-05-09 20:49:57

+0

不要將提交權限授予任何會提交autotools生成文件的人:-P – ptomato 2013-05-10 20:59:36

回答

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可能會顯示新文件,具體取決於您的內部版本生成的內容。

+0

hm,似乎需要m4 /目錄中的某些文件。我得到configure.ac:65:錯誤:可能未定義的宏:AC_COMPILER_CHARACTERISTICS – Korbi 2013-05-06 18:26:36

+0

您是否首先使用'autoreconf --install'?我這樣做,它重新生成'm4'目錄。 – syam 2013-05-06 18:30:04

+1

我會從一個'make maintainer-clean'而不是'distclean'工作。 – 2013-05-07 21:26:54

相關問題