How to match occurance of word in list in makefile

后端 未结 1 1767
花落未央
花落未央 2021-01-06 05:03

I wonder how to match exact occurrence of a given word in the given list of words using only standard makefile operations. In the below example for WORD_TO_MATCH = a the res

相关标签:
1条回答
  • 2021-01-06 05:38

    Use filter instead of findstring:

    ...
    ifneq ($(filter $(WORD_TO_MATCH),$(INPUT_LIST)),)  
        $(warning List contains "$(WORD_TO_MATCH)")
    ...
    
    0 讨论(0)
提交回复
热议问题