2 include $(TOP)/mk/boilerplate.mk
4 ifeq "$(DOING_BIN_DIST)" "YES"
5 # We're doing a binary-dist, descend into a subset of the dirs.
6 SUBDIRS = mkdirhier hp2ps parallel unlit hpc pwd
8 ifeq "$(BootingFromHc)" "YES"
9 SUBDIRS = mkdependC mkdirhier runstdtest genapply genprimopcode unlit
11 SUBDIRS = mkdependC mkdirhier runstdtest hp2ps \
12 parallel unlit genprimopcode genapply hpc pwd
14 ifneq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
15 # lndir doesn't build on Windows
20 ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
24 # Utils that we don't build by default:
27 # Utils that are old and/or bitrotted:
38 # "heap-view" is not in the list because (a) it requires
39 # a Haskell compiler (which you may not have yet), and (b) you are
40 # unlikely to want it desperately. It is easy to build once you have
41 # a Haskell compiler and if you want it.
44 $(INSTALL_DIR) $(BIN_DIST_DIR)/utils
45 $(INSTALL_DATA) Makefile $(BIN_DIST_DIR)/utils/
46 set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d binary-dist; done
48 include $(TOP)/mk/target.mk
50 # genprimopcode is needed to boot in ghc/compiler...
51 ifneq "$(BootingFromHc)" "YES"
53 $(MAKE) -C genprimopcode
56 WITH_BOOTSTRAPPING_COMPILER = installPackage ghc-pkg hsc2hs
58 WITH_STAGE1 = installPackage ghc-pkg hasktags runghc
59 ifneq "$(NO_INSTALL_HSC2HS)" "YES"
63 # sort removes duplicates - we don't actually care about the order
64 WITH_EITHER = $(sort $(WITH_BOOTSTRAPPING_COMPILER) $(WITH_STAGE1))
66 with-bootstrapping-compiler: \
67 $(foreach P,$(WITH_BOOTSTRAPPING_COMPILER),with-bootstrapping-compiler.$P)
69 with-stage-1: $(foreach P,$(WITH_STAGE1),with-stage-1.$P)
71 install:: $(foreach P,$(WITH_STAGE1),install.$P)
73 $(foreach P,$(WITH_BOOTSTRAPPING_COMPILER),with-bootstrapping-compiler.$P): \
74 with-bootstrapping-compiler.%:
75 $(MAKE) -C $* with-bootstrapping-compiler
77 $(foreach P,$(WITH_STAGE1),with-stage-1.$P): \
79 $(MAKE) -C $* with-stage-1
81 $(foreach P,$(WITH_STAGE1),install.$P): \