diff --git a/Makefile b/Makefile index a743e42f91..07b594ea8a 100644 --- a/Makefile +++ b/Makefile @@ -1073,17 +1073,24 @@ printvars: show-vars: VARS?=% show-vars: @: - $(info $(call clean-json, { \ + $(foreach i, \ + $(call clean-json, { \ $(foreach V, \ - $(sort $(foreach X, $(.VARIABLES), $(filter $(VARS),$(X)))), \ - $(if $(filter-out environment% default automatic, $(origin $V)), \ + $(.VARIABLES), \ + $(and $(filter $(VARS),$(V)) \ + , \ + $(filter-out environment% default automatic, $(origin $V)) \ + , \ "$V": { \ "expanded": $(call mk-json-str,$($V))$(comma) \ "raw": $(call mk-json-str,$(value $V)) \ }$(comma) \ ) \ ) \ - } )) + } ) \ + , \ + $(info $(i)) \ + ) .PHONY: clean clean: