【问题标题】:Error in automake自动生成错误
【发布时间】:2014-03-13 10:32:03
【问题描述】:

我正在尝试为 hello world 示例 C 程序创建安装包。

我已经完成了以下步骤。

自动扫描

mv configure.scan configure.ac 编辑 configure.ac 以添加一些宏。

本地

在

中创建 Makefile.am
bin_PROGRAMS = hello
hello_SOURCES = hello.c

最后我做了自动制作。

然后我收到了下面的消息。 .

configure.ac:12: error: required file './compile' not found
configure.ac:12:   'automake --add-missing' can install 'compile'
configure.ac:6: error: required file './missing' not found
configure.ac:6:   'automake --add-missing' can install 'missing'
Makefile.am: error: required file './INSTALL' not found
Makefile.am:   'automake --add-missing' can install 'INSTALL'
Makefile.am: error: required file './NEWS' not found
Makefile.am: error: required file './README' not found
Makefile.am: error: required file './AUTHORS' not found
Makefile.am: error: required file './ChangeLog' not found
Makefile.am: error: required file './COPYING' not found
Makefile.am:   'automake --add-missing' can install 'COPYING'
Makefile.am: error: required file './depcomp' not found
Makefile.am:   'automake --add-missing' can install 'depcomp'

在 Makefile.am 和 configure.ac 文件中没有任何字符串,包括 compile、missing、NEW、README 或说是必需的消息。

我该怎么办?

这些是有关某些产品版本的信息。

CentOS 6.4 版

autocomf-2.69

automake-1.14

m4-1.4

【问题讨论】:

标签: configure autotools autoconf automake


【解决方案1】:

这些文件需要存在才能符合标准的“automake/autoconf”文件集。

按照它给您的说明操作:“automake --add-missing”,缺失的文件将使用您(在理想情况下)适当填写的虚拟信息创建。

尝试仔细阅读autotools tutorial,或者autobook。另见StackOverflow: Getting started with autotools。

此外,阅读手册页,尝试automake --help,阅读实用程序输出的有用信息以帮助您吗?

【讨论】:

  • 在创建了这些虚拟文件之后,automake 没有错误完成。
【解决方案2】:

在这种情况下,可能在configure.ac 中将foreign 添加到AM_INIT_AUTOMAKE 宏可能会有所帮助。

【讨论】:

  • 如何添加外文?你能放整条线吗?是AM_INIT_AUTOMAKE([foreign])???
  • 没错。或者,如果 AM_INIT_AUTOMAKE 已经定义,您可以将 foreign 添加到其以空格分隔的选项列表中。 See more
  • 我遇到了类似的问题,但foreign 已经定义好了,有什么建议吗?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-10-07
  • 2021-08-15
  • 1970-01-01
  • 2020-01-26
  • 2014-08-17
  • 1970-01-01
相关资源
最近更新 更多