“multiple target patterns” Makefile error

后端 未结 6 1797
有刺的猬
有刺的猬 2020-11-27 15:07

My makefile fails with error:

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

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

(GNU

6条回答
  •  無奈伤痛
    2020-11-27 15:56

    I just want to add, if you get this error because you are using Cygwin make and auto-generated files, you can fix it with the following sed,

    sed -e 's@\\\([^ ]\)@/\1@g' -e 's@[cC]:@/cygdrive/c@' -i filename.d
    

    You may need to add more characters than just space to the escape list in the first substitution but you get the idea. The concept here is that /cygdrive/c is an alias for c: that cygwin's make will recognize.

    And may as well throw in

    -e 's@^ \+@\t@'
    

    just in case you did start with spaces on accident (although I /think/ this will usually be a "missing separator" error).

提交回复
热议问题