My makefile fails with error:
Makefile:34: *** multiple target patterns. Stop.
What does it really mean, how can I fix this?
(GNU
My IDE left a mix of spaces and tabs in my Makefile.
Setting my Makefile to use only tabs fixed this error for me.
I met with the same error. After struggling, I found that it was due to "Space" in the folder name.
For example :
Earlier My folder name was : "Qt Projects"
Later I changed it to : "QtProjects"
and my issue was resolved.
Its very simple but sometimes a major issue.
Besides having to escape colons as in the original answer, I have found if the indentation is off you could potentially get the same problem. In one makefile, I had to replace spaces with a tab and that allowed me to get past the error.
I had this problem (colons in the target name) because I had -n
in my GREP_OPTIONS
environment variable. Apparently, this caused configure
to generate the Makefile
incorrectly.
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}
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).