Remove prefix with make

前端 未结 2 707
感动是毒
感动是毒 2020-12-29 02:26

Is there a way to remove a prefix from a string (a pathname in my case) in make?

As an example, suppose I had the string:

FILES = a/b/c.         


        
2条回答
  •  情书的邮戳
    2020-12-29 03:05

    You can strip off a leading a/ with

    $(FILE:a/%=%)
    

    See the text substitution function reference for more options & details.

提交回复
热议问题