|
From: | John Graham-Cumming |
Subject: | Re: $(call ...) versus (macro-name ...) |
Date: | Tue, 14 Feb 2006 19:53:13 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040208 Thunderbird/0.5 Mnenhy/0.6.0.104 |
Paul D. Smith wrote:
However, you're correct that in the special case where call is invoked and not passed any arguments, the variable is simply expanded. So, saying "$(call FOO)" is exactly identically equivalent to saying "$(FOO)" (except a tiny bit slower).
Actually there is one small difference. When you do $(call FOO) GNU Make's code resets the counter used to detect a variable that refers to itself and hence it's possible to use $(call FOO) to avoid a 'variable refers to itself' error if you really know what you are doing.
I recently used this quirk to add interactive breakpoints to my GNU Make Debugger project.
John. -- John Graham-Cumming address@hidden Home: http://www.jgc.org/ Blog: http://www.jgc.org/blog/ POPFile: http://getpopfile.org/ GNU Make Standard Library: http://gmsl.sf.net/ GNU Make Debugger: http://gmd.sf.net/ Fast, Parallel Builds: http://www.electric-cloud.com/ Sign up for my Spam and Anti-spam Newsletter at http://www.jgc.org/
[Prev in Thread] | Current Thread | [Next in Thread] |