makefile变量高级用法的有关问题

makefile变量高级用法的问题makefile如下:ifdef do_sortfunc : sortelsefunc : stripendifbar : b d c

makefile变量高级用法的问题
makefile如下:

ifdef do_sort
func := sort
else
func := strip
endif

bar := b d c a e
foo := $($(func) $(bar)) #注意这句

des :
  echo $(foo)

打印结果:
echo

问题:为什么foo的值为空呢?单独打印func的值和bar的值没有问题。

[解决办法]
foo := $(shell $(func) $(bar))