On Wed, Jun 25, 2008 at 1:57 PM, Philip Guenther <
address@hidden> wrote:
On Wed, Jun 25, 2008 at 12:03 PM, ekurgpold <address@hidden> wrote:
...
> Then ${missing} has all the missing variables which can be echoed to the
> user. But then I need to have this ifndef... section for every variable and
> it's difficult to maintain and read. I've tried a number of things,
> including the following:
>
> required = SOMETHING SOMETHING_ELSE
>
> define CHECKIT
> ifeq ($$($(strip $(1))),)
> echo $(1)
> endif
> endef
>
> missing = $(foreach var,$(required),$(call CHECKIT,$(var)))
>
> I'm using GNU make 3.81, but I'll need something that's fairly portable. Any
> ideas? Thanks in advance...
missing = $(foreach var,${required},$(if $(findstring
undefined,$(origin ${var})),${var}))
Philip Guenther