VAR := hello world all: @echo $(VAR) @echo $(strip $(VAR)) what is the printing value of thiis command? hello world hello world Aren't the two printling value the same? what the hell do you mean?
时间: 2024-01-18 22:05:16 浏览: 66
FreshBox:配方配料应用
I apologize for the confusion. You are correct that in this case, both `echo` commands will print the same value.
The `$(strip)` function removes leading and trailing spaces from a string, but since the `VAR` variable in this case does not have any leading or trailing spaces, the output of `$(strip $(VAR))` will be the same as the output of `$(VAR)`.
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
```
I apologize for any confusion my previous response may have caused.
阅读全文