Currently, the defined function returns $(false) if a key exists in the associative array but the value is empty. Is it possible to support an option, that if enabled, will change the behavior of defined to return $(true) as long as the key exists, even if the value is empty? Something along the lines of:
defined = $(__gmsl_tr2)$(call assert_no_space,$0,$1$2)$(call assert_no_dollar,$0,$1$2)$(call sne,undefined,$(origin __gmsl_aa_$1_$(__gmsl_aa_magic)_$2_gmsl_aa_$1))
The reason is we are using memoize to prevent unnecessary re-execution of long running shell calls.
output = $(call memoize,shell,<long_running_cmd>)
Sometimes, these shell calls do not return any output. When no output is returned from the shell calls, we're seeing them re-executed each time the variable is evaluated. The re-execution can be avoided if the defined function (which memoize depends on) is changed according to this request.
This option would also bring the behavior of defined in line with key existence check commands in languages like perl/python.