SUBDIRS += $(wildcard parallel)
SUBDIRS_BUILD += $(wildcard ndp)
SUBDIRS_BUILD += $(wildcard dph/dph-base)
SUBDIRS += $(wildcard parallel)
SUBDIRS_BUILD += $(wildcard ndp)
SUBDIRS_BUILD += $(wildcard dph/dph-base)
SUBDIRS_BUILD += $(wildcard dph/dph-prim-seq)
SUBDIRS_BUILD += $(wildcard dph/dph-prim-par)
SUBDIRS_BUILD += $(wildcard dph/dph)
SUBDIRS_BUILD += $(wildcard dph/dph-prim-seq)
SUBDIRS_BUILD += $(wildcard dph/dph-prim-par)
SUBDIRS_BUILD += $(wildcard dph/dph)
# We use -main-is so that GHC doesn't get confused and think
# Main.hi/Main.o from cabal belongs to ghc-prim/Setup, or vice-versa.
# We use -main-is so that GHC doesn't get confused and think
# Main.hi/Main.o from cabal belongs to ghc-prim/Setup, or vice-versa.
# does sequentialises building the two of them, which is nice given
# they're sharing -odir and -hidir.
# does sequentialises building the two of them, which is nice given
# they're sharing -odir and -hidir.
cd ghc-prim && $(GHC) $(BOOTSTRAPPING_FLAGS) --make Setup -o Setup
installPackage/installPackage: installPackage.hs
cd ghc-prim && $(GHC) $(BOOTSTRAPPING_FLAGS) --make Setup -o Setup
installPackage/installPackage: installPackage.hs
$(foreach SUBDIR,$(SUBDIRS), \
stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).$(SUBDIR)): \
$(foreach SUBDIR,$(SUBDIRS), \
stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).$(SUBDIR)): \
-$(RM) -f stamp/configure.library.*.$* $*/unbuildable
$(MKDIRHIER) `dirname $@`
( cd $* && $(CABAL) configure $(ALL_CONFIGURE_FLAGS) ) \
-$(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).% \
# 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).% \
# Build the library using 'setup build' (not the default)
$(foreach SUBDIR,$(SUBDIRS),build.library.$(SUBDIR)):\
build.library.%: stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).% \
# Build the library using 'setup build' (not the default)
$(foreach SUBDIR,$(SUBDIRS),build.library.$(SUBDIR)):\
build.library.%: stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).% \
if $(IFBUILDABLE) $*; then \
cd $* && \
$(CABAL) build $(addprefix --ghc-option=,$(GhcLibHcOpts)); \
if $(IFBUILDABLE) $*; then \
cd $* && \
$(CABAL) build $(addprefix --ghc-option=,$(GhcLibHcOpts)); \
$(foreach SUBDIR,$(SUBDIRS),doc.library.$(SUBDIR)):\
doc.library.%: stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).% \
$(foreach SUBDIR,$(SUBDIRS),doc.library.$(SUBDIR)):\
doc.library.%: stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).% \
if $(IFBUILDABLE) $*; then \
cd $* && $(CABAL) haddock --html-location='../$$pkg' \
$(CABAL_HADDOCK_FLAGS); \
if $(IFBUILDABLE) $*; then \
cd $* && $(CABAL) haddock --html-location='../$$pkg' \
$(CABAL_HADDOCK_FLAGS); \
clean: $(foreach SUBDIR,$(SUBDIRS),clean.library.$(SUBDIR))
$(RM) -rf bootstrapping/*
clean: $(foreach SUBDIR,$(SUBDIRS),clean.library.$(SUBDIR))
$(RM) -rf bootstrapping/*