【发布时间】:2015-03-14 13:28:07
【问题描述】:
在Makefile 中带有
%.o: %.c
@echo Compiling $< ...
当我运行 autoreconf --install(autoconf 版本 2.69)时,我收到警告 '%'-style pattern rules are a GNU make extension。警告不是很清楚,但让我觉得configure.ac有什么要补充的。
我在 google.com、duckduckgo.com 和 yahoo.com 上进行了搜索,但它们似乎都无法区分它们索引的大量构建日志(为什么要...),这使得搜索痛苦。我想:
- 我可以通过将
AM_INIT_AUTOMAKE([-Wno-portability])添加到configure.ac(在post of the openais mailing list 中找到)来消除警告,这似乎不太好,因为在技术环境中简单地消除警告通常不是一个好主意 - 请告诉我是否 GNU autotools 是个例外。
【问题讨论】:
-
您没有提供足够的信息。你用automake吗?该语法与您的 Makefile.am 文件中的模式规则一致吗?还是只是 autoconf,语法在您的 Makefile.in 文件中?如果是前者,这条规则可能是没用的。如果是后者,这条规则可能应该写成 SUFFIX 规则。此警告告诉您的是您的 makefile 包含 GNU make 特定的功能(模式规则不是 make 的 POSIX 标准的一部分),并且它不适用于 make 的其他变体。你必须决定你是否关心。
-
另见 Automake 邮件列表中的 Warning about GNU make extension with automake 1.10。
标签: makefile autotools autoconf