提交 e99942cc 编写于 作者: A Alexandr Fadeev 提交者: Alex Ross

Update makefile colorize tests according to the latest grammar. (#61961)

1. Handling the '!=' variable assignment operator.
2. Handling the "#" (hashtag) in the quotes inside the recipe.
3. Restore the recipe handling.

Issue: #60030, #61475
上级 755c02a3
......@@ -25,10 +25,16 @@ hello.o: hello.cpp \
clean:
rm *o hello
.PHONY: all
all:
# "$$" in a shell means to escape makefile's variable substitution.
some_shell_var=$$(sed -nre 's/some regex with (group)/\1/p')
.PHONY: echo
echo:
echo "#" and '#' in quotes are not comments \
and '\' will be continued
define defined
$(info Checking existance of $(1) $(flavor $(1)))
$(if $(filter undefined,$(flavor $(1))),0,1)
......@@ -54,3 +60,14 @@ ifeq ("${ok}", "skip")
$(ok))}
${ok}})
endif
result != echo "'$(ok)' $(shell echo "from inlined shell")"
$(info $(result))
# Below is a test of variable assignment without any spacing.
var=val
var?=val
var:=123
var!=echo val
var:=val \
notvar=butval
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册