Target pattern contains no '%'. Makefile

后端 未结 7 2093
醉梦人生
醉梦人生 2020-12-10 10:48

I have searched this problem in google, but still don\'t have some way to resolve a problem. I have 2 Makefiles: One as example and one as my file. Example:

相关标签:
7条回答
  • 2020-12-10 11:19

    This is a badly written error message from Make. It means "one of your filenames had a character that could be part of a regular expression". Make is very naive about filesystems and quoting. It doesn't believe that:

    foo:  'The bar.'
    

    refers to a literal string. It takes The as one word, bar. as another word, and then barfs on the period. Do this instead:

    foo:  The\ bar\.
    

    or in your case, backslash to the period in .xcodeproj.

    0 讨论(0)
  • 2020-12-10 11:19

    Drop the line 11 on https://github.com/mkovalyk/IIViewDeckControllerBinding/blob/master/src/binding/Makefile. %' is not recognised by make

    0 讨论(0)
  • 2020-12-10 11:20

    This won't work:

    default:
            echo "Hello world!"

    This will:

    default:
    	echo "Hello world!"

    Can you spot the difference?

    That's right, the first one has spaces, the second one has tabs. The one with spaces will give you:

    Makefile:2: *** missing separator. Stop.

    And this is why we cannot have nice things...

    0 讨论(0)
  • 2020-12-10 11:34

    This error occurred for me because I had a rule of the form

    foo: bar:
            baz
    

    (note the trailing :).

    0 讨论(0)
  • 2020-12-10 11:34

    I had this problem if there was a colon in the target file name (i.e. a time stamp), for example:

     all: foo_01:34.txt
     
     foo_%.txt: bar_%.txt
          foobar $< > $@
    

    I had to escape it:

     all: foo_01\:34.txt
     
     foo_%.txt: bar_%.txt
          foobar $< > $@
    
    0 讨论(0)
  • 2020-12-10 11:40

    Solved: just go to the project tab it will present on vertical tab section then go to general and just change the location of project

    0 讨论(0)
提交回复
热议问题