我正在阅读 GNU make 手册中的以下内容:
if you do not want any whitespace characters at the end of your variable value,
you must remember not to put a random comment on the end of the line after some whitespace, such as this:
dir := /foo/bar # directory to put the frobs in
Here the value of the variable dir is ‘/foo/bar ’ (with four trailing spaces),
which was probably not the intention. (Imagine something like ‘$(dir)/file’ with this definition!)
我尝试了一个简单的makefile,如下所示“
foo := hi # four trailing spaces
all:
@echo $(foo)_
执行'make'时,输出只是'hi_','hi'和下划线之间只有一个空格。为什么没有四个空格?
谢谢,