Target pattern contains no '%'. Makefile

后端 未结 7 2115
醉梦人生
醉梦人生 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: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 $< > $@
    

提交回复
热议问题