Hi,

I'm trying  to write a custom function that will abort the make if  there
are variables not defined in the list passed as parameter 1.

The idea is call  the funcion in several places inside the makefile:

....

$(call check_undefined_vars,<var_list1>)

....

$(call check_undefined_vars,<var_list2>)


But I have to write this:

VARS_NOT_DEFINED :=
$(call check_undefined_vars, <var_list>)
ifneq ($(words $(VARS_NOT_DEFINED)),0)
$(error Variable(s): '$(VARS_NOT_DEFINED)' must be defined.)
endif

Because if I move the if with the call to error inside the function
"check_undefined_vars" the make aborts always it does not matter if the
variables in <var_list> are defined or not.

Thanks,
Edson.




_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to