VAR := hello world all: @echo $(VAR) @echo $(strip $(VAR)) what is the printing value of thiis command?
时间: 2024-01-22 22:04:16 浏览: 80
FreshBox:配方配料应用
The `echo` command with `$(VAR)` will print the value of the `VAR` variable with leading and trailing spaces, while the `echo` command with `$(strip $(VAR))` will print the value of `VAR` with leading and trailing spaces removed.
So, if you run `make all` with the following Makefile code:
```
VAR := hello world
all:
@echo $(VAR)
@echo $(strip $(VAR))
```
The output will be:
```
hello world
hello world
```
Note that there is a space after the first output because `VAR` contains leading spaces. The second output does not have leading or trailing spaces.
阅读全文