`autoreconf` 如何创建 m4/ 文件夹?

时间:2021-01-23 10:50:09

标签: autoconf autoreconf

我点击了 a problem - 我发现了非常奇怪的情况:

  1. 我在本地运行 Docker 映像并在那里运行 autoreconf -i,我得到了正确且强大的 ./configure 脚本。
  2. 然后我在同一个 Docker 镜像中运行 autoreconf -i,但在 Gitlab CI 下。而且我的 ./configure 脚本损坏了 - 一些 M4 宏没有替换它们的 shell 代码,因此 Bash 无法执行它们并将它们视为语法错误。

不同之处在于两次运行中的 m4/ 文件夹:成功的 m4/ 文件夹包含如下文件:

aria2_arg.m4
ax_check_compile_flag.m4
ax_cxx_compile_stdcxx_11.m4
codeset.m4
fallocate.m4
fcntl-o.m4
gettext.m4
... # and so on

但在失败的 (Gitlab CI) m4/ 文件夹中有:

gettext.m4
fcntl-o.m4
# ... and so on

aria2_arg.m4ax_check_compile_flag.m4ax_cxx_compile_stdcxx_11.m4fallocate.m4 和其他缺失。我不知道如果 Docker 映像在两种情况下都相同怎么可能,但是... autoreconf 如何创建 m4/ 文件夹?如果它的内容来源是 Docker 镜像本身(我不知道是不是真的,这只是我的建议),那么为什么这两种情况下的内容不同?

1 个答案:

答案 0 :(得分:0)

没有任何魔法。丢失的 m4 文件确实存在于原始 Aria2 Github 存储库(在 m4/ 中)文件夹中。 autoreconf -i 将另一个 .m4 文件添加到此文件夹。但它有 .gitignore 和 .m4 规则。我将它添加到另一个 git repo(在 Gitlab 中构建它)但 m4/ 文件夹被忽略。所以:

 Aria2   ->   local folder   ->   run docker ->     OK
Github          with m4/            locally      m4/ exists

工作正常,但是:

Aria2   ->  another git repo   ->   run Gitlab CI ->      Failure
Github        (now no m4/)                             (.m4 missing)

所以,问题的原因似乎是 - 第二个 git repo 中 m4/ 的缺失(至少我已经成功构建了第一个)

相关问题