- print GHCMK "\$(eval \$(call build-package,${package},dist-install,${stage}))\n";
- close GHCMK;
+ print GHCMK "\$(eval \$(call build-package,${package},dist-install,\$(if \$(filter ${dir},\$(STAGE2_PACKAGES)),2,1)))\n";
+ close GHCMK
+ or die "Closing $package/ghc.mk failed: $!";