mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-30 17:22:33 +00:00
make: add print-% target printing variable value
Add a print-% make target, to be able to retrieve the value of make variables. E.g. "make print-MY_MAKE_VAR MY_MAKE_VAR=1" will print "1" Signed-off-by: Marco Vedovati <mvedovati@suse.com>
This commit is contained in:
parent
3718af5f9f
commit
cbb8c01412
9
Makefile
9
Makefile
@ -125,3 +125,12 @@ install-scripts:
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf $(DISTRO_ROOTFS_MARKER) $(DISTRO_ROOTFS) $(DISTRO_IMAGE) $(DISTRO_INITRD)
|
||||
|
||||
# Prints the name of the variable passed as suffix to the print- target,
|
||||
# E.g., if Makefile contains:
|
||||
# MY_MAKE_VAR := foobar
|
||||
# Then:
|
||||
# $ make printf-MY_MAKE_VAR
|
||||
# Will print "foobar"
|
||||
print-%:
|
||||
@echo $($*)
|
||||
|
Loading…
Reference in New Issue
Block a user