build: process variable exports from toplevel.mk only once