-ifneq "$$(NO_INCLUDE_PKGDATA)" "YES"
-ifeq "$$($1_$2_VERSION)" ""
-$$(error phase ordering error: $1/$2 is enabled, but $1/$2/package-data.mk does not exist)
+# We don't install things compiled by stage 0, so no need to put them
+# in the bindist.
+ifneq "$$(BINDIST) $3" "YES 0"
+
+# This give us things like
+# all_libraries: all_libraries/base_dist-install
+ifneq "$$($1_$2_GROUP)" ""
+all_$$($1_$2_GROUP): all_$1_$2