18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ci# 'info' prints the argument to stdout. 48c2ecf20Sopenharmony_ci$(info,hello world 0) 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci# 'warning-if', if the first argument is y, sends the second argument to stderr, 78c2ecf20Sopenharmony_ci# and the message is prefixed with the current file name and line number. 88c2ecf20Sopenharmony_ci$(warning-if,y,hello world 1) 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci# 'error-if' is similar, but it terminates the parsing immediately. 118c2ecf20Sopenharmony_ci# The following is just no-op since the first argument is not y. 128c2ecf20Sopenharmony_ci$(error-if,n,this should not be printed) 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci# Shorthand 158c2ecf20Sopenharmony_ciwarning = $(warning-if,y,$(1)) 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci# 'shell' executes a command, and returns its stdout. 188c2ecf20Sopenharmony_ci$(warning,$(shell,echo hello world 3)) 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci# Every newline in the output is replaced with a space, 218c2ecf20Sopenharmony_ci# but any trailing newlines are deleted. 228c2ecf20Sopenharmony_ci$(warning,$(shell,printf 'hello\nworld\n\n4\n\n\n')) 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci# 'filename' is expanded to the currently parsed file name, 258c2ecf20Sopenharmony_ci# 'lineno' to the line number. 268c2ecf20Sopenharmony_ci$(warning,filename=$(filename)) 278c2ecf20Sopenharmony_ci$(warning,lineno=$(lineno)) 28