$(MAKE) -C rts boot
$(MAKE) -C rts
$(MAKE) -C libraries all
- $(MAKE) -C utils with-stage-1
# When making distributions (i.e., whether with binary-dist or using the
# vanilla install target to create an installer package), we can have problems
stage2 : check-all
$(MAKE) -C compiler stage=2 boot
$(MAKE) -C compiler stage=2
+ $(MAKE) -C utils with-stage-2
ifeq "$(HADDOCK_DOCS)" "YES"
- $(MAKE) -C compiler stage=2 doc
+ $(MAKE) -C libraries doc
+ $(MAKE) -C compiler doc stage=2
endif
stage3 : check-all
$(MAKE) -C ../ghc stage=$*
doc.stage.%:
- $(CABAL) haddock --distpref dist-stage$*
+ $(CABAL) haddock --distpref dist-stage$* \
+ --haddock-option=--optghc=-DSTAGE=$* \
+ --with-haddock=$(FPTOOLS_TOP_ABS)/utils/haddock/install-inplace/bin/haddock
# XXX We ought to actually install the (stage 2) library
install:
all: build
-ifeq "$(HADDOCK_DOCS)" "YES"
-all: doc
-endif
-
.PHONY: rebuild.library.%
.PHONY: remake.library.%
ifneq "$(HSCOLOUR)" ""
CABAL_HADDOCK_FLAGS += --hyperlink-source
endif
-CABAL_HADDOCK_FLAGS += --with-haddock=$(FPTOOLS_ABS_TOP)/utils/haddock/install-inplace/bin/haddock
+CABAL_HADDOCK_FLAGS += --with-haddock=$(FPTOOLS_TOP_ABS)/utils/haddock/install-inplace/bin/haddock
$(foreach SUBDIR,$(DOC_SUBDIRS),doc.library.$(SUBDIR)):\
doc.library.%: stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).% \
set -e
+HADDOCK=../utils/haddock/install-inplace/bin/haddock
HADDOCK_ARGS=
NAMES=
done
# Now create the combined contents and index pages
-haddock --gen-index --gen-contents -o . \
- -t "Haskell Hierarchical Libraries" \
- $HADDOCK_ARGS
+$HADDOCK --gen-index --gen-contents -o . \
+ -t "Haskell Hierarchical Libraries" \
+ $HADDOCK_ARGS
# Unhandled Windows help stuff?:
COMMON_CONFIGURE_FLAGS += --with-alex=$(ALEX)
endif
-ifneq "$(HADDOCK)" ""
-COMMON_CONFIGURE_FLAGS += --with-haddock=$(HADDOCK)
-endif
-
ifneq "$(HAPPY)" ""
COMMON_CONFIGURE_FLAGS += --with-happy=$(HAPPY)
endif
endif
endif
-# Tell stage1 to make a dynamically-linked binary, but no wrapper. We assume
+# Tell stage2 to make a dynamically-linked binary, but no wrapper. We assume
# that in an installation the shared libs will be installed somewhere that
# the system can find them.
ifeq "$(BuildSharedLibs)" "YES"
DYN_FLAGS = --ghc-option=-dynamic --ghc-option=-dynload --ghc-option=deploy
endif
-.PHONY: default all with-bootstrapping-compiler with-stage-1 clean distclean
+.PHONY: default all with-bootstrapping-compiler with-stage-2 clean distclean
default all: with-bootstrapping-compiler
$(CABAL) build --distpref dist-inplace $(BUILD_FLAGS)
$(CABAL) install --distpref dist-inplace $(INSTALL_FLAGS)
-with-stage-1:
+with-stage-2:
$(CABAL) configure --distpref dist-install \
$(INSTALL_DIRS_CONFIGURE_FLAGS) \
- $(USE_STAGE1_CONFIGURE_FLAGS) \
+ $(USE_STAGE2_CONFIGURE_FLAGS) \
$(COMMON_CONFIGURE_FLAGS) \
- $(EXTRA_STAGE1_CONFIGURE_FLAGS)
+ $(EXTRA_STAGE2_CONFIGURE_FLAGS)
$(CABAL) build --distpref dist-install $(DYN_FLAGS) $(BUILD_FLAGS)
install:
WITH_BOOTSTRAPPING_COMPILER = installPackage ghc-pkg hsc2hs hpc
-WITH_STAGE1 = installPackage ghc-pkg hasktags runghc hpc pwd haddock
+WITH_STAGE2 = installPackage ghc-pkg hasktags runghc hpc pwd haddock
ifneq "$(NO_INSTALL_HSC2HS)" "YES"
-WITH_STAGE1 += hsc2hs
+WITH_STAGE2 += hsc2hs
endif
# sort removes duplicates - we don't actually care about the order
-WITH_EITHER = $(sort $(WITH_BOOTSTRAPPING_COMPILER) $(WITH_STAGE1))
+WITH_EITHER = $(sort $(WITH_BOOTSTRAPPING_COMPILER) $(WITH_STAGE2))
-binary-dist: $(foreach P,$(WITH_STAGE1),binary-dist.$P)
+binary-dist: $(foreach P,$(WITH_STAGE2),binary-dist.$P)
ifeq "$(WHERE_AM_I)" ""
echo "I don't know where I am" >&2
exit 1
with-bootstrapping-compiler: \
$(foreach P,$(WITH_BOOTSTRAPPING_COMPILER),with-bootstrapping-compiler.$P)
-with-stage-1: $(foreach P,$(WITH_STAGE1),with-stage-1.$P)
+with-stage-2: $(foreach P,$(WITH_STAGE2),with-stage-2.$P)
+ $(MAKE) -C haddock install-inplace
-install:: $(foreach P,$(WITH_STAGE1),install.$P)
+install:: $(foreach P,$(WITH_STAGE2),install.$P)
$(foreach P,$(WITH_EITHER),clean.$P): \
clean.%:
with-bootstrapping-compiler.%:
$(MAKE) -C $* with-bootstrapping-compiler
-$(foreach P,$(WITH_STAGE1),with-stage-1.$P): \
-with-stage-1.%:
- $(MAKE) -C $* with-stage-1
+$(foreach P,$(WITH_STAGE2),with-stage-2.$P): \
+with-stage-2.%:
+ $(MAKE) -C $* with-stage-2
-$(foreach P,$(WITH_STAGE1),install.$P): \
+$(foreach P,$(WITH_STAGE2),install.$P): \
install.%:
$(MAKE) -C $* install
-$(foreach P,$(WITH_STAGE1),binary-dist.$P): \
+$(foreach P,$(WITH_STAGE2),binary-dist.$P): \
binary-dist.%:
$(MAKE) -C $* binary-dist WHERE_AM_I=$(WHERE_AM_I)/$*
ENABLE_SHELL_WRAPPERS = YES
EXTRA_CLEAN = Version.hs
EXTRA_INPLACE_CONFIGURE_FLAGS = $(INPLACE_GHC_DATADIR_CONFIGURE_FLAGS)
-EXTRA_STAGE1_CONFIGURE_FLAGS = --datasubdir=.
+EXTRA_STAGE2_CONFIGURE_FLAGS = --datasubdir=.
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/cabal.mk
with-bootstrapping-compiler: Version.hs
-with-stage-1: Version.hs
+with-stage-2: Version.hs
Version.hs: Makefile $(TOP)/mk/config.mk
$(RM) -f Version.hs
include $(TOP)/mk/cabal.mk
# We should stop installPackage being installed itself, but we do need
-# to build it with the stage1 compiler as we need to use it when
+# to build it with the stage2 compiler as we need to use it when
# installing.
do let userHooks = simpleUserHooks
copyto = if null destdir then NoCopyDest else CopyTo destdir
copyFlags = defaultCopyFlags {
+ copyDistPref = toFlag distPref,
copyUseWrapper = toFlag enableShellWrappers,
copyDest = toFlag copyto,
copyVerbosity = toFlag verbosity
}
registerFlags = defaultRegisterFlags {
+ regDistPref = toFlag distPref,
regPackageDB = toFlag GlobalPackageDB,
regVerbosity = toFlag verbosity,
regGenScript = toFlag $ False,