magic for debugging in make
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 2 Apr 2014 17:35:35 +0000 (19:35 +0200)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 2 Apr 2014 17:35:35 +0000 (19:35 +0200)
Makefile

index 3f9bf37..6279ed1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -219,3 +219,13 @@ sfa/util/{sfalogging,faults,genicode,enumeration,__init__}.py
 clientlibsync: 
        @[ -d "$(CLIENTLIBTARGET)" ] || { echo "You need to set the make variable CLIENTLIBTARGET"; exit 1; }
        rsync -av --relative $(CLIENTLIBFILES) $(CLIENTLIBTARGET)
+
+#################### convenience, for debugging only
+# make +foo : prints the value of $(foo)
+# make ++foo : idem but verbose, i.e. foo=$(foo)
+++%: varname=$(subst +,,$@)
+++%:
+       @echo "$(varname)=$($(varname))"
++%: varname=$(subst +,,$@)
++%:
+       @echo "$($(varname))"