-########################################
-ifeq "$$($1_$2_CONFIGURE_PHASE)" ""
-$$(error No configure phase for $1_$2)
-else ifeq "$$($1_$2_CONFIGURE_PHASE)" "$$(phase)"
-
-ifeq "$$(DEBUG)" "YES"
-$$(warning $1/$2 configure phase)
-endif
-
-ifneq "$$(BINDIST)" "YES"
-$(call build-package-data,$1,$2,$3)
-endif
-
-ifneq "$$(NO_INCLUDE_PKGDATA)" "YES"
-include $1/$2/package-data.mk
-endif
-
-else ifeq "$$(phase_$$($1_$2_CONFIGURE_PHASE)_or_later)" "YES"
-
-ifeq "$$(DEBUG)" "YES"
-$$(warning $1/$2 build phase)
-endif
-
-ifneq "$$(NO_INCLUDE_PKGDATA)" "YES"
-include $1/$2/package-data.mk
-ifeq "$$($1_$2_VERSION)" ""
-$$(error No version for $1_$2 found)
-endif
-endif
-
-$(call all-target,$1,all_$1_$2)
-
-else
-
-ifeq "$$(DEBUG)" "YES"
-$$(warning $1/$2 disabled phase)
-endif
-
-endif
-########################################
-
-# 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
-endif
-
-ifneq "$$(CHECKED_$1)" "YES"
-CHECKED_$1 = YES
-check_packages: check_$1
-.PHONY: check_$1
-check_$1: $$(GHC_CABAL_INPLACE)
- $$(GHC_CABAL_INPLACE) check $1
-endif
-
-ifeq "$$(phase_$$($1_$2_CONFIGURE_PHASE)_done)" "YES"
-