SUBDIRS += $(wildcard stm)
SUBDIRS += $(wildcard xhtml)
SUBDIRS += $(wildcard cgi)
-ifeq "$(GhcLibsWithObjectIO)" "YES"
-SUBDIRS += $(wildcard ObjectIO)
-endif
SUBDIRS += $(wildcard parallel)
SUBDIRS_BUILD += $(wildcard ndp)
SUBDIRS_BUILD += $(wildcard dph/dph-base)
HERE_ABS=$(FPTOOLS_TOP_ABS)/libraries
IFBUILDABLE=ifBuildable/ifBuildable $(HERE_ABS)/boot-packages
-CABAL=$(HERE_ABS)/cabal-bin $(GHC) $(HERE_ABS)/bootstrapping.conf
CABAL_GHC_FLAGS = -Wall
ifeq "$(ghc_ge_605)" "NO"
CABAL_GHC_FLAGS += -cpp
endif
-BOOTSTRAPPING_FLAGS = $(CABAL_GHC_FLAGS) -DCABAL_VERSION=1,3 -odir $(HERE_ABS)/bootstrapping -hidir $(HERE_ABS)/bootstrapping -i$(HERE_ABS)/Cabal -i$(HERE_ABS)/filepath
+BOOTSTRAPPING_FLAGS = $(CABAL_GHC_FLAGS) -DCABAL_VERSION=1,3 -odir $(HERE_ABS)/bootstrapping -hidir $(HERE_ABS)/bootstrapping -i$(HERE_ABS)/Cabal -i$(HERE_ABS)/filepath -i$(HERE_ABS)/hpc
.PHONY: boot
cd Cabal && $(CABAL) configure --distpref=dist-bootstrapping --with-compiler=$(GHC) --with-hc-pkg=$(GHC_PKG) --package-db=$(HERE_ABS)/$@.tmp
cd Cabal && $(CABAL) build --distpref=dist-bootstrapping
cd Cabal && $(CABAL) install --distpref=dist-bootstrapping --inplace
+ -cd hpc && $(CABAL) clean --distpref=dist-bootstrapping
+ cd hpc && $(CABAL) configure --distpref=dist-bootstrapping --with-compiler=$(GHC) --with-hc-pkg=$(GHC_PKG) --package-db=$(HERE_ABS)/$@.tmp
+ cd hpc && $(CABAL) build --distpref=dist-bootstrapping
+ cd hpc && $(CABAL) install --distpref=dist-bootstrapping --inplace
mv $@.tmp $@
installPackage/installPackage: installPackage.hs
# We should depend on %/%.cabal here (and in other rules), but make
# makes that difficult.
-ifeq "$(Windows)" "YES"
-NONEXISTENT=c:/NONEXISTENT
-else
-NONEXISTENT=/NONEXISTENT
-endif
-
ALL_CONFIGURE_FLAGS = \
$(INSTALL_CONFIGURE_FLAGS) \
--haddock-options="--use-contents=../index.html \
$(foreach SUBDIR,$(SUBDIRS), \
stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).$(SUBDIR)): \
-stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).%: cabal-bin
+stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).%: cabal-bin \
+ bootstrapping.conf
-$(RM) -f stamp/configure.library.*.$* $*/unbuildable
$(MKDIRHIER) `dirname $@`
( cd $* && $(CABAL) configure $(ALL_CONFIGURE_FLAGS) ) \
# make.*, so filter them out and use an alternate rule below instead.
$(foreach SUBDIR,$(filter-out $(SUBDIRS_BUILD),$(SUBDIRS)),make.library.$(SUBDIR)):\
make.library.%: stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).% \
- cabal-bin ifBuildable/ifBuildable
+ cabal-bin ifBuildable/ifBuildable bootstrapping.conf
if $(IFBUILDABLE) $*; then \
cd $* && \
cmp -s $(MAKEFILE_LOCAL) Makefile.local || cp $(MAKEFILE_LOCAL) .; \
# Build the library using 'setup build' (not the default)
$(foreach SUBDIR,$(SUBDIRS),build.library.$(SUBDIR)):\
build.library.%: stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).% \
- cabal-bin ifBuildable/ifBuildable
+ cabal-bin ifBuildable/ifBuildable bootstrapping.conf
if $(IFBUILDABLE) $*; then \
cd $* && \
$(CABAL) build $(BUILD_FLAGS); \
$(foreach SUBDIR,$(SUBDIRS),doc.library.$(SUBDIR)):\
doc.library.%: stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).% \
- cabal-bin ifBuildable/ifBuildable
+ cabal-bin ifBuildable/ifBuildable bootstrapping.conf
if $(IFBUILDABLE) $*; then \
cd $* && $(CABAL) haddock --html-location='../$$pkg' \
$(CABAL_HADDOCK_FLAGS); \
clean: $(foreach SUBDIR,$(SUBDIRS),clean.library.$(SUBDIR))
-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