If I have a list in a GNU Makefile, is it possible to create a new list with the original strings modified. This is would be perfect if there was the map
higher-order procedure from some languages.
This is an example of what I'm trying to do
DIRS=A B C D
#apply some magic to cr开发者_StackOverfloweate
DIRS_INCLUDE=-IA -IB -IC -ID
Since you've said it's GNU Make:
DIRS_INCLUDE=$(foreach dir,$(DIRS),-I$(dir))
See http://www.gnu.org/software/make/manual/html_node/Foreach-Function.html#Foreach-Function
精彩评论