From 47a357992bbfdef280eadb6efd71bea60b72289e Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Fri, 14 Oct 2016 21:51:54 +0800 Subject: Makefile: Add one liner to get the value of any variable Handy liner to help debugging Makefile. Credit: http://blog.jgc.org/2015/04/the-one-line-you-should-add-to-every.html --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c2c0690..deee1fd 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,8 @@ default: @echo " (build and) install the package to the virtualenv" @echo " + test" @echo " run the tests" + @echo " + print-" + @echo " print the value of variable " # Create virtualenv and install/update the dependencies venv: ${VENV}/bin/activate @@ -36,3 +38,8 @@ devbuild: venv # Run the tests test: devbuild ./${VENV}/bin/python3 setup.py test + + +# One liner to get the value of any makefile variable +# Credit: http://blog.jgc.org/2015/04/the-one-line-you-should-add-to-every.html +print-%: ; @echo $*=$($*) -- cgit v1.2.2