Skip to content

Commit df0d150

Browse files
committed
make: revert/correct fix for plain undef symbol.
The return value from _error was causing some breakage in other error handling. Instead, return a value from the spot where the undefined symbol error is set. This achieves the desired fix without breaking other unclosed sequence errors.
1 parent 72eb6c9 commit df0d150

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

make/env.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ ENV_FIND = $(strip \
4343
,\
4444
$(call ENV_FIND,$(call _get,$(1),__outer__),$(2)))))
4545

46-
ENV_GET = $(foreach env,|$(call ENV_FIND,$(1),$(2))|,$(if $(call _EQ,||,$(env)),$(call _error,'$(2)' not found),$(call _get,$(strip $(subst |,,$(env))),$(subst =,$(__equal),$(2)))))
46+
ENV_GET = $(foreach env,|$(call ENV_FIND,$(1),$(2))|,$(if $(call _EQ,||,$(env)),$(call _error,'$(2)' not found)$(__nil),$(call _get,$(strip $(subst |,,$(env))),$(subst =,$(__equal),$(2)))))
4747

4848
ENV_SET = $(if $(call _assoc!,$(1),$(subst =,$(__equal),$(2)),$(3)),$(1),)
4949

make/types.mk

+5-5
Original file line numberDiff line numberDiff line change
@@ -68,18 +68,18 @@ __var_print = $(foreach v,$(1),\
6868
_visualize_memory = $(foreach var,$(sort $(foreach vv,$(filter $(__obj_magic)_%,$(.VARIABLES)),$(call __var_name,$(vv)))),$(call __var_print,$(__obj_magic)_$(var)))
6969

7070

71+
# Errors/Exceptions
72+
__ERROR :=
73+
_error = $(strip $(eval __ERROR := $(call _string,$(1))))
74+
75+
7176
# Constant atomic values
7277
__undefined = $(__obj_magic)_undf_0
7378
__nil = $(__obj_magic)__nil_0
7479
__true = $(__obj_magic)_true_0
7580
__false = $(__obj_magic)_fals_0
7681

7782

78-
# Errors/Exceptions
79-
__ERROR :=
80-
_error = $(eval __ERROR := $(call _string,$(1)))$(__nil)
81-
82-
8383
# General functions
8484

8585
# Return the type of the object (or "make" if it's not a object

0 commit comments

Comments
 (0)