Remove item from a Makefile variable?

前端 未结 3 415
不知归路
不知归路 2020-12-24 00:04

I have a makefile, which includes several other makefiles, which in turn all add to a variable like this:

VAR := Something SomethingElse
VAR += SomeOtherThin         


        
3条回答
  •  天涯浪人
    2020-12-24 00:46

    You could use the filter-out text function if you're using GNU Make.

    OTHERVAR := $(filter-out SomethingElse,$(VAR))
    

提交回复
热议问题