That's it! Thank you so much, my code is much cleaner now.

Elmar

On Wed, Jun 25, 2008 at 5:28 PM, Philip Guenther <[EMAIL PROTECTED]> wrote:

> On Wed, Jun 25, 2008 at 4:13 PM, Elmar Kurgpold <[EMAIL PROTECTED]>
> wrote:
> > I get the same output, but now I see the problem. This code will work if
> the
> > var is not in the include file at all, but it will ignore vars that have
> > empty strings. So if you added:
> >
> > SOMETHING_ELSE=
> >
> > ...then the code below would show no error. I'll have to make sure these
> > vars have a value. Almost there..
>
> Ah, that's because I used $(origin) to avoid expanding the variable.
> To *exactly* mimic ifndef, use this:
>
> missing = $(foreach var,${required},$(if $(value ${var}),,${var})
>
> Given these:
>  empty=
>  nothing=${empty}
>
> that'll report 'empty' as missing but *won't* report 'nothing' as
> missing, just like the ifndef test would.
>
>
> If you want to treat both 'empty' and 'nothing' as missing, then use this:
>
> missing = $(foreach var,${required},$(if ${${var}},,${var})
>
> (Note that the $(value) function used by the version at top was added
> in GNU make 3.80)
>
>
> Philip Guenther
>
>
> _______________________________________________
> Help-make mailing list
> Help-make@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-make
>



-- 
Elmar Kurgpold
Dreamsonics
[EMAIL PROTECTED]
Mobile: 415-871-5915
Fax: 509-355-8234
_______________________________________________
Help-make mailing list
Help-make@gnu.org
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to