diff options
author | Aaron LI <aaronly.me@outlook.com> | 2016-10-14 21:51:54 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@outlook.com> | 2016-10-14 21:52:00 +0800 |
commit | 47a357992bbfdef280eadb6efd71bea60b72289e (patch) | |
tree | bd8137c30e22e860bd237ad445da6d5610c29a50 | |
parent | fd85a3ecaa2fc0b684d6dbd00c803c9b1ca75349 (diff) | |
download | fg21sim-47a357992bbfdef280eadb6efd71bea60b72289e.tar.bz2 |
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
-rw-r--r-- | Makefile | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -21,6 +21,8 @@ default: @echo " (build and) install the package to the virtualenv" @echo " + test" @echo " run the tests" + @echo " + print-<VARIABLE>" + @echo " print the value of variable <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 $*=$($*) |