Performing greater-than less-than calculations in a Makefile

前端 未结 4 436
花落未央
花落未央 2021-01-11 09:40

I\'m trying to do this in a Makefile:

value = 2.0

if ${greaterthan ${value}, 1.50}
-> execute a rule
elseif ${lessthan ${value}, 0.50}
-> execute a ru         


        
4条回答
  •  耶瑟儿~
    2021-01-11 09:47

    Try this

    In this example VER is checked for greater than 4

    ifeq ($(shell test $(VER) -gt 4; echo $$?),0)
      IFLAGS += -I$(TOPDIR)/include
      LIBS += -L$(TOPDIR)/libs -lpcap
    endif
    

提交回复
热议问题