Re: [cc65] Please critique this makefile

From: <silverdr1wfmh.org.pl>
Date: 2010-04-26 01:09:45
On 2010-04-25, at 00:08, Oliver Schmidt wrote:
>
> ifeq ($(MYVAR),)
>
> is actually equivalent to
>
> ifndef MYVAR
>
> which is easier to read/understand:
> [...]
> 4. I tried it with GNU make 3.81 on Cygwin and it works exactly as
> implemented and documented - meaning that "ifndef" _can_ be used in
> that context.

Tested it on the same version of GNU make, and - indeed - it works as  
you describe. However, now that I think of it:

1. When writing the conditionals I was having doubts whether  
"assigning an empty value to a variable _does_ define it!" - so the  
very same nature of doubt as Greg had

2. Not every make possibly works that way

3. ifeq allows to tell exactly "if the value is empty", while ifndef  
says "if the variable is not defined". IMHO the latter is quite  
ambiguous. For example, without your thorough explanations on GNU  
make, I wouldn't know for sure that it is actually the same.

So, having said that I am not fully convinced that ifndef would be  
easier to understand in this particular context.

Anyway - I find this a minor problem.

-- 
SD!
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Apr 26 01:10:00 2010

This archive was generated by hypermail 2.1.8 : 2010-04-26 01:10:03 CEST