日期:2014-05-16  浏览次数:20782 次

Makefile 中数字判断 熟悉makefile的大侠帮帮忙
需要对makefile中的某个变量判断是否全为数字,熟悉makefile的大侠帮帮忙!!!
------解决方案--------------------
var1=12345
var2=v12.3b

all:
@echo ==================
ifeq ($(shell echo $(var1) 
------解决方案--------------------
sed 's/[0-9]//g'),)
@echo $(var1) only contain numbers
else
@echo $(var1) contain other characters
endif
ifeq ($(shell echo $(var2) 
------解决方案--------------------
sed 's/[0-9]//g'),)
@echo $(var2) only ocntain numbers
else
@echo $(var2) contain other characters
endif