Suppose you have a variable which is set as:
AVar = "#"
echo "${AVar}"
The above thing does not outp开发者_开发技巧ut in Makefile when run through make.
# must be escaped but the AVar may not have special chars in its content?
So what can I escape the Avar?
Tested working with GNU Make 3.81 on MacOS X:
AVar = "\#"
foo:
@echo "${AVar}"
I'm not sure what you mean by "AVar may not have special chars in its content". In this case it's the only way to tell make
that the #
is part of the string, and not the start of a comment.
精彩评论