+$(foreach SUBDIR,$(SUBDIRS),install.library.$(SUBDIR)): \
+install.library.%: installPackage/installPackage ifBuildable/ifBuildable
+ if ifBuildable/ifBuildable $*; then \
+ cd $* && \
+ ../installPackage/installPackage '$(GHC_PKG_PROG)' '$(DESTDIR)$(libdir)/package.conf' '$(DESTDIR)' '$(prefix)' '$(iprefix)' '$(ibindir)' '$(ilibdir)' '$(ilibexecdir)' '$(idatadir)' '$(idocdir)' '$(ihtmldir)' '$(iinterfacedir)' ; \
+ fi
+
+.PHONY: binary-dist binary-dist.library.%
+
+BIN_DIST_LIBDIR=$(BIN_DIST_DIR)/libraries
+
+binary-dist: $(foreach SUBDIR,$(SUBDIRS),binary-dist.library.$(SUBDIR))
+ mkdir $(BIN_DIST_LIBDIR)/installPackage
+ cp installPackage/installPackage $(BIN_DIST_LIBDIR)/installPackage
+ mkdir $(BIN_DIST_LIBDIR)/ifBuildable
+ cp ifBuildable/ifBuildable $(BIN_DIST_LIBDIR)/ifBuildable
+ cp Makefile $(BIN_DIST_LIBDIR)
+ifeq "$(HADDOCK_DOCS)" "YES"
+ cp gen_contents_index $(BIN_DIST_LIBDIR)
+ cp index.html $(BIN_DIST_LIBDIR)
+ cp doc-index*.html $(BIN_DIST_LIBDIR)
+endif
+ cp -pR stamp $(BIN_DIST_LIBDIR)
+ # This gets used in the compiler directory to see if GHC should
+ # depend on the readline package or not
+ $(MKDIRHIER) $(BIN_DIST_LIBDIR)/readline
+ cp readline/config.mk $(BIN_DIST_LIBDIR)/readline
+
+$(foreach SUBDIR,$(SUBDIRS),binary-dist.library.$(SUBDIR)): \
+binary-dist.library.%:
+ if ifBuildable/ifBuildable $*; then \
+ $(MKDIRHIER) $(BIN_DIST_LIBDIR)/$*; \
+ cd $* && \
+ cp $*.cabal $(BIN_DIST_LIBDIR)/$* && \
+ cp LICENSE $(BIN_DIST_LIBDIR)/$* && \
+ cp -R dist $(BIN_DIST_LIBDIR)/$* && \
+ $(FIND) . -name "*.buildinfo" -exec cp {} $(BIN_DIST_LIBDIR)/$* \; && \
+ (cp -RL include $(BIN_DIST_LIBDIR)/$* || true) && \
+ $(FIND) $(BIN_DIST_LIBDIR)/$*/dist \
+ \( -name "*_split" -o -name "autogen" \) | xargs rm -rf && \
+ $(FIND) $(BIN_DIST_LIBDIR)/$*/dist \
+ \( \( -name "*.o" -o -name "*.p_o" \) -a ! -name "HS*" \) \
+ -exec rm {} \; ; \
+ fi
+
+# Ignore some doc targets that we don't support
+# The root recurses into us when these targets are made
+.PHONY: html-no-chunks chm HxS fo dvi ps pdf
+html-no-chunks chm HxS fo dvi ps pdf:
+ @: