Escaping colons in filenames in a Makefile

后端 未结 6 1748
再見小時候
再見小時候 2020-12-03 20:59

Is there a way to get GNU make to work correctly with filenames that contain colons?

The specific problem I\'m running into happens to involve a pattern rule. Here\

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-03 21:46

    There is another way i've found today when dealing with Makefile variables defining filenames (containing colons).

    # definition
    SOME_FNAME = $(NAME)__colon__$(VERSION)
    
    # usage in target
    foo:
        $(do_something) $(subst __colon__,:,$(SOME_FNAME))
    

提交回复
热议问题