echo-cmd = $(if 1,\ $(info $(escchar)) && echo ' $(call escchar,$(echo-why)' ;) echo-cmd = $(if 1,\ $(info $(escchar)) && echo ' $(call escchar,$(echo-why)' ;)?
时间: 2024-02-18 16:00:35 浏览: 87
There seems to be a missing closing parenthesis in the variable definition. It should be:
```
echo-cmd = $(if 1,\ $(info $(escchar)) && echo ' $(call escchar,$(echo-why))' ;)
```
Note that I added a closing parenthesis after `$(echo-why)` to match the opening parenthesis earlier in the line.
相关问题
echo-cmd = $(if 1,\ $(info $(escchar)) && echo ' $(call escchar,$(echo-why)' ;) is there any mistake?
Yes, there is a mistake in this variable definition. There is a missing closing parenthesis in the `$(call escchar)` function call. It should be:
```
echo-cmd = $(if 1,\ $(info $(escchar)) && echo ' $(call escchar,$(echo-why))' ;)
```
Note the added closing parenthesis after `$(echo-why)` to match the opening parenthesis earlier in the line.
echo-cmd = $(if 1,\ $(info $(escchar)) && echo ' $(call escchar,$($(quiet)cmd_$(1)))' ;) Syntax error: "&&" unexpected
The error message suggests that there is a problem with the use of `&&` in this variable definition. In Makefiles, the `&&` operator is used to chain commands together so that the second command only runs if the first command was successful. However, this syntax is not supported in all contexts.
To fix the error, you could try breaking up the commands into separate lines, like this:
```
echo-cmd = $(if 1, \
$(info $(escchar)) ; \
echo ' $(call escchar,$($(quiet)cmd_$(1)))' ; \
)
```
This splits the two commands into separate lines with a semicolon `;` between them. This should work in most contexts and avoid the syntax error you encountered.
阅读全文
相关推荐
















