+clean: $(foreach SUBDIR,$(SUBDIRS),clean.library.$(SUBDIR))
+ -cd extensible-exceptions && $(CABAL) clean --distpref=dist-bootstrapping
+ -cd filepath && $(CABAL) clean --distpref=dist-bootstrapping
+ -cd Cabal && $(CABAL) clean --distpref=dist-bootstrapping
+ -cd hpc && $(CABAL) clean --distpref=dist-bootstrapping
+ $(RM) -rf bootstrapping
+ $(RM) -f bootstrapping.conf bootstrapping.conf.old
+ $(RM) -f bootstrapping.conf.tmp bootstrapping.conf.tmp.old
+ $(RM) -f cabal-bin cabal-bin.exe
+ $(RM) -rf ifBuildable
+ $(RM) -f libraries.txt index.html doc-index.html doc-index*.html
+ $(RM) -f haddock* *.gif
+ $(RM) -rf stamp/*
+ifneq "$(wildcard dph)" ""
+ $(MAKE) -C dph clean
+endif
+
+maintainer-clean distclean:
+ $(RM) $(foreach lib, $(SUBDIRS), $(lib)/.depend $(lib)/.depend.bak)
+
+$(foreach SUBDIR,$(SUBDIRS),clean.library.$(SUBDIR)): \
+clean.library.%:
+ $(RM) -f stamp/configure.library.*.$* $*/unbuildable
+ -cd $* && $(CABAL) clean
+ $(RM) -f $*/Setup $*/Setup.exe $*/Setup.hi $*/Setup.o
+ $(RM) $*/GNUmakefile $*/Makefile.local
+endif
+
+# -----------------------------------------------------------------------------
+
+.PHONY: install install-docs install.library.%