In GNU Make, how do I convert a variable to lower case?

前端 未结 5 1051
误落风尘
误落风尘 2020-12-08 12:45

This is a silly question, but.... with GNU Make:

VAR = MixedCaseText
LOWER_VAR = $(VAR,lc)

default:
        @echo $(VAR)
        @echo $(LOWER_VAR)
<         


        
5条回答
  •  心在旅途
    2020-12-08 13:34

    If Python is installed this runs even on Windows:

    $(shell python -c "print('$(VAR)'.lower())")
    

提交回复
热议问题