Enable $environment to be undef for some targets