[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Checking that required variables have been set
From: |
Philip Guenther |
Subject: |
Re: Checking that required variables have been set |
Date: |
Wed, 25 Jun 2008 15:45:04 -0700 |
On Wed, Jun 25, 2008 at 3:39 PM, Elmar Kurgpold <address@hidden> wrote:
> Hi, thank you for your help. This example didn't produce any output,
> ${missing} is empty.
Here's my test case:
$ cat Makefile
required = SOMETHING SOMETHING_ELSE
SOMETHING=foo
missing = $(foreach var,${required},$(if $(findstring
undefined,$(origin ${var})),${var}))
all:
@echo ${missing}
$ make
SOMETHING_ELSE
$ make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i386-unknown-openbsd4.3
$
What do you get when you try that?
Philip Guenther