Source: Ng Ho F1=No
Dir:=/cc/test/CPP/SRC
Define the VAR
Lib=$(foreach L, $(source) and $(dir)/$(L) Class. Cc)
SRC=https://bbs.csdn.net/topics/$(foreach L, $(lib) and $(wildcard $(L)))
Endef
The loop: the Class=
$(foreach, L, $(loop) and $(eval $(call VAR, $(L))))
PHONY: all
All:
@ echo Makefile "begin"
@ echo "source:" $(source)
@ echo "lib:" $(lib)
@ echo "SRC:" $(SRC)
@ echo "Makefile end
"
A relatively simple Makefile, I/cc/test/CPP/SRC directory have NgClass. Cc HoClass. Cc F1Class. Cc three files
I expect the SRC can then get this three filename, bring the directory
But now I'm the execution of the fruit like this:
The Makefile begin
Source: No Ng Ho F1
Lib/cc/test/CPP/SRC/NgClass. Cc/cc/test/CPP/SRC/HoClass. Cc/cc/test/CPP/SRC/F1Class. Cc/cc/test/CPP/SRC/NoClass. Cc
SRC:
The Makefile end
Why is this? O great god answer