[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Feature request: Make undefined variables an error
From: |
Alexander Jolk |
Subject: |
Re: Feature request: Make undefined variables an error |
Date: |
Wed, 13 Jul 2005 15:15:46 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Debian/1.7.8-1 |
Eric Sorenson wrote:
On my test case, before the patch I ended up with a file named
/tmp/$(testvar) which, truly I can't imagine being the desired
behavior. It seems like fixing this would really be a good way to catch
typos and so forth. Does anybody on the list rely on the current behavior?
Well, I actually do rely on it in some way. I often copy: files from my
server according to some variable's value. As an example, an X11 driver
will be copied to /usr/X11R6/lib/modules/drivers/nvidia_drv.so from
$(fileserver)/linux/$(nvdrv)/nvidia_drv.so-$(nvver), where the variable
nvver is defined according to which version I want to install on a
particular client. Now I simply don't have to worry about this code for
any machine that doesn't properly define $(nvver), the copy will just
silently fail, but the rest of the config goes on correctly.
Of course, I can work around this particular instance by
AllowRedefinitionOf = ( nvver )
nvver = ( undefined )
classes::
nvver = ( nv7174 )
Alex
--
Alexander Jolk * BUF Compagnie * alexj@buf.com
Tel +33-1 42 68 18 28 * Fax +33-1 42 68 18 29