Skip to content

Commit

Permalink
Update makefile colorize tests according to the latest grammar. (#61961)
Browse files Browse the repository at this point in the history
1. Handling the '!=' variable assignment operator.
2. Handling the "#" (hashtag) in the quotes inside the recipe.
3. Restore the recipe handling.

Issue: #60030, #61475
  • Loading branch information
fadeevab authored and alexr00 committed Nov 6, 2018
1 parent 755c02a commit e99942c
Show file tree
Hide file tree
Showing 2 changed files with 822 additions and 79 deletions.
17 changes: 17 additions & 0 deletions extensions/make/test/colorize-fixtures/makefile
Expand Up @@ -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)
Expand All @@ -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

0 comments on commit e99942c

Please sign in to comment.