“多个目标模式"指的是“多个目标模式". Makefile错误

问题描述:

我的makefile失败并出现错误:

My makefile fails with error:

Makefile:34: *** multiple target patterns.  Stop.

这实际上是什么意思,我该如何解决?

What does it really mean, how can I fix this?

( GNU制作手册,由船长编写很明显,没有帮助).

(GNU make manual, written by Captain Obvious, isn't helping).

找到了.我有以下形式的规则:

Found it. I had rule in form:

$(FOO): bar

其中FOO是通过shell命令设置的,它用包含冒号的错误消息污染了它.

where FOO was set from shell command that polluted it with error message that contained a colon.

我在Makefile上放了它

I had it on the Makefile

MAPS+=reverse/db.901:550:2001.ip6.arpa 
lastserial:  ${MAPS}
    ./updateser ${MAPS}

这是因为文件名中的:. 我用

It's because of the : in the file name. I solved this with


                      -------- notice
                     /    /
                    v    v
MAPS+=reverse/db.901\:550\:2001.ip6.arpa
lastserial:  ${MAPS}
    ./updateser ${MAPS}