+# C and S files are possibly built the "dyn" way.
+ifeq "$$(BuildSharedLibs)" "YES"
+$(call c-objs,$1,$2,dyn)
+$(call c-suffix-rules,$1,$2,dyn,YES)
+endif
+
+$(call all-target,$1,all_$1_$2)
+# 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