产生混合的隐式和普通规则的错误 [英] Make error of mixed implicit and normal rules

查看:83
本文介绍了产生混合的隐式和普通规则的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在构建开源项目时,我遇到以下错误:

When building an open source project I met error of:

make  subdir=manual -C manual ..=../ subdir_lib
Makefile:235: *** mixed implicit and normal rules.  Stop.

Makefile的第235行中的代码如下:

Code from line 235 of the Makefile as follows:

235: $(objpfx)stubs ../po/manual.pot $(objpfx)stamp%:
236:    $(make-target-directory)
237:    touch $@

推荐答案

当您拥有类似模式规则输出(包含%)的内容时,GNU make将打印该错误消息.规则声明中:左侧的正常输出(没有%).例如:

That error message is printed by GNU make when you have something that looks like a pattern rule output (containing a %) as well as something that looks like a normal output (no %) on the left-hand side of a : in a rule declaration. For example:

%.pat normal:
        @echo $@

因此,在Makefile的第235行中,您设法将一些看起来像"的结构放在一起.为避免该错误,请修复该声明,最有可能的方法是将其分成两个部分:

So on line 235 of your Makefile, you have managed to put together something that "looks like" that construct. To avoid the error, fix that declaration, most likely by splitting it into two:

%.pat:
        @echo $@

normal:
        @echo $@

在没有看到产生此错误的完整makefile的情况下,我们没有更多建议可以提供给您.

Without seeing the complete makefile that produced this error there's not much more advice we can give you.

这篇关于产生混合的隐式和普通规则的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆