2 # -----------------------------------------------------------------------------
4 # (c) 2009 The University of Glasgow
6 # This file is part of the GHC build system.
8 # To understand how the build system works and how to modify it, see
9 # http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
10 # http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
12 # -----------------------------------------------------------------------------
16 # * remove old Makefiles, add new stubs for building in subdirs
18 # * docs/docbook-cheat-sheet/Makefile
19 # * docs/ext-core/Makefile
21 # * docs/storage-mgmt/Makefile
23 # * rts/dotnet/Makefile
25 # * add Makefiles for the rest of the utils/ programs that aren't built
26 # by default (need to exclude them from 'make all' too)
30 # * per-source-file dependencies instead of one .depend file?
31 # * eliminate undefined variables, and use --warn-undefined-variables?
32 # * put outputs from different ways in different subdirs of distdir/build,
33 # then we don't have to use -osuf/-hisuf. We would have to install
34 # them in different places too, so we'd need ghc-pkg support for packages
36 # * make PACKAGES generated by './configure' or './boot'?
37 # * we should use a directory of package.conf files rather than a single
38 # file for the inplace package database, so that we can express
39 # dependencies more accurately. Otherwise it's possible to get into
40 # a state where the package database is out of date, and the build
41 # system doesn't know.
43 # Approximate build order.
45 # The actual build order is defined by dependencies, and the phase
46 # ordering used to ensure correct ordering of makefile-generation; see
47 # http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture/Idiom/PhaseOrdering
49 # * With bootstrapping compiler:
50 # o Build utils/ghc-cabal
51 # o Build utils/ghc-pkg
52 # o Build utils/hsc2hs
54 # o configure, generate package-data.mk and inplace-pkg-info
55 # o register each package into inplace/lib/package.conf
57 # * With bootstrapping compiler:
58 # o Build libraries/{filepath,hpc,extensible-exceptions,Cabal}
59 # o Build compiler (stage 1)
63 # o Build utils/* (except haddock)
64 # o Build compiler (stage 2)
66 # o Build utils/haddock
67 # o Build compiler (stage 3) (optional)
72 .PHONY: default all haddock
74 # We need second expansion for the way we handle directories, so that
76 # expands to the directory of a rule that uses a % pattern.
81 # Catch make if it runs away into an infinite loop
82 ifeq "$(MAKE_RESTARTS)" ""
83 else ifeq "$(MAKE_RESTARTS)" "1"
84 else ifeq "$(MAKE_RESTARTS)" "2"
86 $(error Make has restarted itself $(MAKE_RESTARTS) times; is there a makefile bug?)
89 ifneq "$(CLEANING)" "YES"
93 # -----------------------------------------------------------------------------
97 space=$(nothing) $(nothing)
100 # Cancel all suffix rules. Ideally we'd like to have 'make -r' turned on
101 # by default, because that disables all the implicit rules, but there doesn't
102 # seem to be a good way to do that. This turns off all the old-style suffix
103 # rules, which does half the job and speeds up make quite a bit:
106 # -----------------------------------------------------------------------------
109 # to see the effective value used for a Makefile variable, do
110 # make show VALUE=MY_VALUE
114 @echo '$(VALUE)="$($(VALUE))"'
116 # -----------------------------------------------------------------------------
117 # Include subsidiary build-system bits
121 ifeq "$(findstring clean,$(MAKECMDGOALS))" ""
123 ifeq "$(ProjectVersion)" ""
124 $(error Please run ./configure first)
130 # (Optional) build-specific configuration
131 include mk/custom-settings.mk
133 ifeq "$(findstring clean,$(MAKECMDGOALS))" ""
134 ifeq "$(GhcLibWays)" ""
135 $(error $$(GhcLibWays) is empty, it must contain at least one way)
143 # -----------------------------------------------------------------------------
144 # Utility definitions
146 include rules/prof.mk
147 include rules/trace.mk
148 include rules/make-command.mk
150 # -----------------------------------------------------------------------------
151 # Macros for standard targets
153 include rules/all-target.mk
154 include rules/clean-target.mk
156 # -----------------------------------------------------------------------------
159 $(eval $(call clean-target,inplace,,inplace/bin inplace/lib))
161 # -----------------------------------------------------------------------------
162 # Whether to build dependencies or not
164 # When we're just doing 'make clean' or 'make show', then we don't need
165 # to build dependencies.
167 ifneq "$(findstring clean,$(MAKECMDGOALS))" ""
168 NO_INCLUDE_DEPS = YES
169 NO_INCLUDE_PKGDATA = YES
171 ifneq "$(findstring bootstrapping-files,$(MAKECMDGOALS))" ""
172 NO_INCLUDE_DEPS = YES
173 NO_INCLUDE_PKGDATA = YES
175 ifeq "$(findstring show,$(MAKECMDGOALS))" "show"
176 NO_INCLUDE_DEPS = YES
177 # We want package-data.mk for show
180 # -----------------------------------------------------------------------------
183 include rules/way-prelims.mk
185 $(foreach way,$(ALL_WAYS),\
186 $(eval $(call way-prelims,$(way))))
188 # -----------------------------------------------------------------------------
191 include rules/distdir-way-opts.mk
193 # -----------------------------------------------------------------------------
194 # Finding source files and object files
196 include rules/hs-sources.mk
197 include rules/c-sources.mk
198 include rules/includes-sources.mk
199 include rules/hs-objs.mk
200 include rules/c-objs.mk
201 include rules/cmm-objs.mk
203 # -----------------------------------------------------------------------------
206 # Suffix rules cause "make clean" to fail on Windows (trac #3233)
207 # so we don't make any when cleaning.
208 ifneq "$(CLEANING)" "YES"
210 include rules/hs-suffix-rules-srcdir.mk
211 include rules/hs-suffix-rules.mk
212 include rules/hi-rule.mk
214 $(foreach way,$(ALL_WAYS),\
215 $(eval $(call hi-rule,$(way))))
217 include rules/c-suffix-rules.mk
218 include rules/cmm-suffix-rules.mk
222 # -----------------------------------------------------------------------------
223 # Building package-data.mk files from .cabal files
225 include rules/package-config.mk
227 # -----------------------------------------------------------------------------
228 # Building dependencies
230 include rules/dependencies.mk
231 include rules/build-dependencies.mk
232 include rules/include-dependencies.mk
234 # -----------------------------------------------------------------------------
235 # Build package-data.mk files
237 include rules/build-package-data.mk
239 # -----------------------------------------------------------------------------
240 # Build and install a program
242 include rules/build-prog.mk
243 include rules/shell-wrapper.mk
245 # -----------------------------------------------------------------------------
246 # Build a perl script
248 include rules/build-perl.mk
250 # -----------------------------------------------------------------------------
253 include rules/build-package.mk
254 include rules/build-package-way.mk
255 include rules/haddock.mk
256 include rules/tags-package.mk
257 include rules/extra-packages.mk
259 # -----------------------------------------------------------------------------
260 # Registering hand-written package descriptions (used in libffi and rts)
262 include rules/manual-package-config.mk
264 # -----------------------------------------------------------------------------
267 include rules/docbook.mk
269 # -----------------------------------------------------------------------------
272 include rules/bindist.mk
274 # -----------------------------------------------------------------------------
277 # Don't try to delete directories:
280 # Create build directories on demand. NB. the | below: this indicates
281 # that $(MKDIRHIER) is an order-only dependency, which means that this
282 # rule fires after building mkdirhier, but we won't try to recreate
283 # directories if mkdirhier changes.
287 # -----------------------------------------------------------------------------
290 # --------------------------------
291 # Properties of packages
292 # These lists say "if this package is built, here's a property it has"
293 # They do not say "this package will be built"; see $(PACKAGES_xx) for that
295 # Packages that are built but not installed
296 INTREE_ONLY_PACKAGES := haskeline mtl terminfo utf8-string xhtml
298 DPH_PACKAGES := dph/dph-base dph/dph-prim-interface dph/dph-prim-seq \
299 dph/dph-common dph/dph-prim-par dph/dph-par dph/dph-seq \
302 # Packages that, if present, must be built by the stage2 compiler,
303 # because they use TH and/or annotations, or depend on other stage2
305 STAGE2_PACKAGES := $(DPH_PACKAGES) haskell98 haskell2010 random
306 # Packages that we shouldn't build if we don't have TH (e.g. because
307 # we're building a profiled compiler):
308 TH_PACKAGES := $(DPH_PACKAGES)
310 # Packages that are built by stage0, in addition to stage1. These
311 # packages are dependencies of GHC, that we do not assume the stage0
312 # compiler already has installed (or up-to-date enough).
314 # We assume that the stage0 compiler has a suitable bytestring package,
315 # so we don't have to include it below.
316 STAGE0_PACKAGES = Cabal hpc extensible-exceptions binary bin-package-db hoopl
318 # These packages are installed, but are installed hidden
319 # Why install them at all? Because the 'ghc' package depends on them
320 HIDDEN_PACKAGES = binary
322 # $(EXTRA_PACKAGES) is another classification, of packages built but
324 # It is set in rules/extra-package.mk,
325 # by $(call extra-packages) a little further down
329 # --------------------------------
331 # The lists of packages that we *actually* going to build in each stage:
333 # $(STAGE0_PACKAGE) does double duty; it really is the list of packages
334 # we build the bootstrap compiler in stage 0
336 # $(PACKAGES) A list of directories relative to libraries/ containing
337 # packages that will be built by stage1, in dependency
340 # $(PACKAGES_STAGE2) Ditto, for stage2.
343 define addPackageGeneral
344 # args: $1 = PACKAGES variable, $2 = package, $3 = condition
348 ifeq "$$(CLEANING)" "YES"
358 define addPackage # args: $1 = package, $2 = condition
359 ifneq "$(filter $1,$(TH_PACKAGES)) $(GhcProfiled)" "$1 YES"
360 ifeq "$(filter $1,$(STAGE2_PACKAGES))" "$1"
361 $(call addPackageGeneral,PACKAGES_STAGE2,$1,$2)
363 $(call addPackageGeneral,PACKAGES,$1,$2)
368 $(eval $(call addPackage,ghc-prim))
369 ifeq "$(CLEANING)" "YES"
370 $(eval $(call addPackage,integer-gmp))
371 $(eval $(call addPackage,integer-simple))
373 $(eval $(call addPackage,$(INTEGER_LIBRARY)))
375 $(eval $(call addPackage,base))
376 $(eval $(call addPackage,filepath))
377 $(eval $(call addPackage,array))
378 $(eval $(call addPackage,bytestring))
379 $(eval $(call addPackage,containers))
381 $(eval $(call addPackage,Win32,($$(Windows),YES)))
382 $(eval $(call addPackage,unix,($$(Windows),NO)))
384 $(eval $(call addPackage,old-locale))
385 $(eval $(call addPackage,old-time))
386 $(eval $(call addPackage,time))
387 $(eval $(call addPackage,directory))
388 $(eval $(call addPackage,process))
389 $(eval $(call addPackage,random))
390 $(eval $(call addPackage,extensible-exceptions))
391 $(eval $(call addPackage,haskell98))
392 $(eval $(call addPackage,haskell2010))
393 $(eval $(call addPackage,hpc))
394 $(eval $(call addPackage,pretty))
395 $(eval $(call addPackage,template-haskell))
396 $(eval $(call addPackage,Cabal))
397 $(eval $(call addPackage,binary))
398 $(eval $(call addPackage,bin-package-db))
399 $(eval $(call addPackage,hoopl))
400 $(eval $(call addPackage,mtl))
401 $(eval $(call addPackage,utf8-string))
402 $(eval $(call addPackage,xhtml))
403 $(eval $(call addPackage,terminfo,($$(Windows),NO)))
404 $(eval $(call addPackage,haskeline))
406 $(eval $(call extra-packages))
408 # -------------------------------------------
409 # Dependencies between package-data.mk files
411 # We cannot run ghc-cabal to configure a package until we have
412 # configured and registered all of its dependencies. So the following
413 # hack forces all the configure steps to happen in exactly the following order:
415 # $(PACKAGES) ghc(stage2) $(PACKAGES_STAGE2)
417 # Ideally we should use the correct dependencies here to allow more
418 # parallelism, but we don't know the dependencies until we've
419 # generated the pacakge-data.mk files.
421 libraries/$1/$2/package-data.mk : $$(GHC_PKG_INPLACE) $$(fixed_pkg_prev)
422 fixed_pkg_prev:=libraries/$1/$2/package-data.mk
425 ifneq "$(BINDIST)" "YES"
427 $(foreach pkg,$(PACKAGES),$(eval $(call fixed_pkg_dep,$(pkg),dist-install)))
429 # the GHC package doesn't live in libraries/, so we add its dependency manually:
430 compiler/stage2/package-data.mk: $(fixed_pkg_prev)
431 fixed_pkg_prev:=compiler/stage2/package-data.mk
433 # and continue with PACKAGES_STAGE2, which depend on GHC:
434 $(foreach pkg,$(PACKAGES_STAGE2),$(eval $(call fixed_pkg_dep,$(pkg),dist-install)))
436 ghc/stage1/package-data.mk: compiler/stage1/package-data.mk
437 ghc/stage2/package-data.mk: compiler/stage2/package-data.mk
438 # haddock depends on ghc and some libraries, but depending on GHC's
439 # package-data.mk is sufficient, as that in turn depends on all the
441 utils/haddock/dist/package-data.mk: compiler/stage2/package-data.mk
442 utils/ghc-pwd/dist/package-data.mk: compiler/stage2/package-data.mk
443 utils/ghc-cabal/dist-install/package-data.mk: compiler/stage2/package-data.mk
445 utils/ghc-pkg/dist-install/package-data.mk: compiler/stage2/package-data.mk
446 utils/hsc2hs/dist-install/package-data.mk: compiler/stage2/package-data.mk
447 utils/compare_sizes/dist/package-data.mk: compiler/stage2/package-data.mk
448 utils/runghc/dist/package-data.mk: compiler/stage2/package-data.mk
450 # add the final two package.conf dependencies: ghc-prim depends on RTS,
451 # and RTS depends on libffi.
452 libraries/ghc-prim/dist-install/package-data.mk : rts/package.conf.inplace
453 rts/package.conf.inplace : libffi/package.conf.inplace
456 # --------------------------------
457 # Misc package-related settings
459 BOOT_PKG_CONSTRAINTS := $(foreach p,$(STAGE0_PACKAGES),--constraint "$p == $(shell grep -i "^Version:" libraries/$p/$p.cabal | sed "s/[^0-9.]//g")")
461 # The actual .a and .so/.dll files: needed for dependencies.
462 ALL_STAGE1_LIBS = $(foreach lib,$(PACKAGES),$(libraries/$(lib)_dist-install_v_LIB))
463 ifeq "$(BuildSharedLibs)" "YES"
464 ALL_STAGE1_LIBS += $(foreach lib,$(PACKAGES),$(libraries/$(lib)_dist-install_dyn_LIB))
466 BOOT_LIBS = $(foreach lib,$(STAGE0_PACKAGES),$(libraries/$(lib)_dist-boot_v_LIB))
468 OTHER_LIBS = libffi/dist-install/build/libHSffi$(v_libsuf) libffi/dist-install/build/HSffi.o
469 ifeq "$(BuildSharedLibs)" "YES"
470 OTHER_LIBS += libffi/dist-install/build/libHSffi$(dyn_libsuf)
473 # ----------------------------------------
474 # Special magic for the ghc-prim package
476 # We want the ghc-prim package to include the GHC.Prim module when it
477 # is registered, but not when it is built, because GHC.Prim is not a
478 # real source module, it is built-in to GHC. The old build system did
479 # this using Setup.hs, but we can't do that here, so we have a flag to
480 # enable GHC.Prim in the .cabal file (so that the ghc-prim package
481 # remains compatible with the old build system for the time being).
482 # GHC.Prim module in the ghc-prim package with a flag:
484 libraries/ghc-prim_CONFIGURE_OPTS += --flag=include-ghc-prim
486 # And then we strip it out again before building the package:
487 define libraries/ghc-prim_PACKAGE_MAGIC
488 libraries/ghc-prim_dist-install_MODULES := $$(filter-out GHC.Prim,$$(libraries/ghc-prim_dist-install_MODULES))
491 PRIMOPS_TXT = $(GHC_COMPILER_DIR)/prelude/primops.txt
493 libraries/ghc-prim/dist-install/build/GHC/PrimopWrappers.hs : $(GENPRIMOP_INPLACE) $(PRIMOPS_TXT) | $$(dir $$@)/.
494 "$(GENPRIMOP_INPLACE)" --make-haskell-wrappers <$(PRIMOPS_TXT) >$@
496 # Required so that Haddock documents the primops.
497 libraries/ghc-prim_dist-install_EXTRA_HADDOCK_SRCS = libraries/ghc-prim/dist-install/build/autogen/GHC/Prim.hs
499 # ----------------------------------------
500 # Special magic for the integer package
502 ifneq "$(CLEANING)" "YES"
503 ifeq "$(INTEGER_LIBRARY)" "integer-gmp"
504 libraries/base_dist-install_CONFIGURE_OPTS += --flags=-integer-simple
505 else ifeq "$(INTEGER_LIBRARY)" "integer-simple"
506 libraries/base_dist-install_CONFIGURE_OPTS += --flags=integer-simple
508 $(error Unknown integer library: $(INTEGER_LIBRARY))
512 # ----------------------------------------------
513 # Checking packages with 'cabal check'
515 ifeq "$(phase)" "final"
516 ifeq "$(CHECK_PACKAGES)" "YES"
521 # These packages don't pass the Cabal checks because hs-source-dirs
522 # points outside the source directory. This isn't a real problem in
523 # these cases, so we just skip checking them.
524 # NB. these must come before we include the ghc.mk files below, because
525 # they disable the relevant rules.
526 CHECKED_libraries/dph/dph-seq = YES
527 CHECKED_libraries/dph/dph-par = YES
528 # In compiler's case, include-dirs points outside of the source tree
529 CHECKED_compiler = YES
531 # -----------------------------------------------------------------------------
532 # Include build instructions from all subdirs
534 ifneq "$(BINDIST)" "YES"
546 ifneq "$(GhcUnregisterised)" "YES"
551 ifneq "$(BINDIST)" "YES"
565 ifneq "$(BINDIST)" "YES"
571 ifneq "$(CLEANING)" "YES"
573 $(patsubst %, libraries/%, $(PACKAGES))
576 ifeq "$(INTEGER_LIBRARY)" "integer-gmp"
577 BUILD_DIRS += libraries/integer-gmp/gmp
578 else ifneq "$(findstring clean,$(MAKECMDGOALS))" ""
579 BUILD_DIRS += libraries/integer-gmp/gmp
595 ifeq "$(Windows)" "YES"
600 ifneq "$(BINDIST)" "YES"
602 utils/mkUserGuidePart
605 BUILD_DIRS += utils/count_lines
606 BUILD_DIRS += utils/compare_sizes
608 ifneq "$(CLEANING)" "YES"
609 # After compiler/, because these packages depend on it
611 $(patsubst %, libraries/%, $(PACKAGES_STAGE2))
614 # ----------------------------------------------
615 # Actually include all the sub-ghc.mk's
617 include $(patsubst %, %/ghc.mk, $(BUILD_DIRS))
619 # A useful pseudo-target (must be after the include above, because it needs
620 # the value of things like $(libraries/base_dist-install_v_LIB).
622 stage1_libs : $(ALL_STAGE1_LIBS)
624 # ----------------------------------------------
625 # Per-package compiler flags
627 # If you want to add per-package compiler flags, this
628 # is the place to do it. Do it like this for package <pkg>
630 # libraries/<pkg>_dist-boot_HC_OPTS += -Wwarn
631 # libraries/<pkg>_dist-install_HC_OPTS += -Wwarn
633 # Add $(GhcLibHcOpts) to all package builds
634 $(foreach pkg,$(PACKAGES) $(PACKAGES_STAGE2),$(eval libraries/$(pkg)_dist-install_HC_OPTS += $$(GhcLibHcOpts)))
636 # Add $(GhcBootLibHcOpts) to all stage0 package builds
637 $(foreach pkg,$(STAGE0_PACKAGES),$(eval libraries/$(pkg)_dist-boot_HC_OPTS += $$(GhcBootLibHcOpts)))
639 # -----------------------------------------------
640 # Haddock-related bits
642 # Don't run Haddock for the package that will not be installed
643 $(foreach p,$(INTREE_ONLY_PACKAGES),$(eval libraries/$p_dist-install_DO_HADDOCK = NO))
644 # We don't haddock the bootstrapping libraries
645 $(foreach p,$(STAGE0_PACKAGES),$(eval libraries/$p_dist-boot_DO_HADDOCK = NO))
647 # Build the Haddock contents and index
648 ifeq "$(HADDOCK_DOCS)" "YES"
649 libraries/index.html: inplace/bin/haddock$(exeext) $(ALL_HADDOCK_FILES)
650 cd libraries && sh gen_contents_index --inplace
651 ifeq "$(phase)" "final"
652 $(eval $(call all-target,library_doc_index,libraries/index.html))
654 INSTALL_LIBRARY_DOCS += libraries/*.html libraries/*.gif libraries/*.css libraries/*.js
655 CLEAN_FILES += libraries/doc-index* libraries/haddock*.css \
656 libraries/haddock*.js libraries/index*.html libraries/*.gif
659 # -----------------------------------------------------------------------------
660 # Bootstrapping libraries
662 # We need to build a few libraries with the installed GHC, since GHC itself
663 # and some of the tools depend on them:
665 ifneq "$(BINDIST)" "YES"
667 ifneq "$(BOOTSTRAPPING_CONF)" ""
668 ifeq "$(wildcard $(BOOTSTRAPPING_CONF))" ""
669 $(shell echo "[]" >$(BOOTSTRAPPING_CONF))
673 $(eval $(call clean-target,$(BOOTSTRAPPING_CONF),,$(BOOTSTRAPPING_CONF)))
675 # These three libraries do not depend on each other, so we can build
678 $(eval $(call build-package,libraries/hpc,dist-boot,0))
679 $(eval $(call build-package,libraries/extensible-exceptions,dist-boot,0))
680 $(eval $(call build-package,libraries/Cabal,dist-boot,0))
681 $(eval $(call build-package,libraries/binary,dist-boot,0))
682 $(eval $(call build-package,libraries/bin-package-db,dist-boot,0))
683 $(eval $(call build-package,libraries/hoopl,dist-boot,0))
685 # register the boot packages in strict sequence, because running
686 # multiple ghc-pkgs in parallel doesn't work (registrations may get
689 $(foreach pkg,$(STAGE0_PACKAGES),$(eval $(call fixed_pkg_dep,$(pkg),dist-boot)))
691 compiler/stage1/package-data.mk : $(fixed_pkg_prev)
693 # Make sure we have all the GHCi libs by the time we've built
694 # ghc-stage2. DPH includes a bit of Template Haskell which needs the
695 # GHCI libs, and we don't have a better way to express that dependency.
697 GHCI_LIBS = $(foreach lib,$(PACKAGES),$(libraries/$(lib)_dist-install_GHCI_LIB)) \
698 $(compiler_stage2_GHCI_LIB)
700 ifeq "$(UseArchivesForGhci)" "NO"
701 ghc/stage2/build/tmp/$(ghc_stage2_PROG) : $(GHCI_LIBS)
704 ifeq "$(UseArchivesForGhci)" "YES"
710 # Deps for TH uses in libraries
711 $(foreach way, $(GhcLibWays),$(eval \
712 libraries/vector/dist-install/build/Data/Vector/Fusion/Stream/Monadic.$($(way)_osuf): \
713 $(libraries/primitive_dist-install_$(GHCI_lib_way)_LIB) \
717 # -----------------------------------------------------------------------------
718 # Creating a local mingw copy on Windows
720 ifeq "$(Windows)" "YES"
722 install : install_mingw
723 .PHONY: install_mingw
724 install_mingw : $(INPLACE_MINGW)
725 "$(CP)" -Rp $(INPLACE_MINGW) $(prefix)
727 install : install_perl
729 install_perl : $(INPLACE_PERL)
730 "$(CP)" -Rp $(INPLACE_PERL) $(prefix)
734 ifneq "$(BINDIST)" "YES"
735 $(ghc-prim-$(libraries/ghc-prim_dist-install_VERSION)_HADDOCK_FILE): \
736 libraries/ghc-prim/dist-install/build/autogen/GHC/Prim.hs
739 libraries/ghc-prim/dist-install/build/autogen/GHC/Prim.hs: \
740 $(PRIMOPS_TXT) $(GENPRIMOP_INPLACE) \
742 "$(GENPRIMOP_INPLACE)" --make-haskell-source < $< > $@
750 # -----------------------------------------------------------------------------
753 install: install_libs install_packages install_libexecs install_headers \
754 install_libexec_scripts install_bins install_topdirs
755 ifeq "$(HADDOCK_DOCS)" "YES"
756 install: install_docs
759 install_bins: $(INSTALL_BINS)
760 $(call INSTALL_DIR,"$(DESTDIR)$(bindir)")
761 for i in $(INSTALL_BINS); do \
762 $(call INSTALL_PROGRAM,$(INSTALL_BIN_OPTS),$$i,"$(DESTDIR)$(bindir)") ; \
765 install_libs: $(INSTALL_LIBS)
766 $(call INSTALL_DIR,"$(DESTDIR)$(ghclibdir)")
767 for i in $(INSTALL_LIBS); do \
770 $(call INSTALL_DATA,$(INSTALL_OPTS),$$i,"$(DESTDIR)$(ghclibdir)"); \
771 $(RANLIB) $(DESTDIR)$(ghclibdir)/`basename $$i` ;; \
773 $(call INSTALL_DATA,-s $(INSTALL_OPTS),$$i,"$(DESTDIR)$(ghclibdir)") ;; \
775 $(call INSTALL_SHLIB,$(INSTALL_OPTS),$$i,"$(DESTDIR)$(ghclibdir)") ;; \
777 $(call INSTALL_SHLIB,$(INSTALL_OPTS),$$i,"$(DESTDIR)$(ghclibdir)");; \
779 $(call INSTALL_DATA,$(INSTALL_OPTS),$$i,"$(DESTDIR)$(ghclibdir)"); \
783 install_libexec_scripts: $(INSTALL_LIBEXEC_SCRIPTS)
784 ifeq "$(INSTALL_LIBEXEC_SCRIPTS)" ""
787 $(call INSTALL_DIR,"$(DESTDIR)$(ghclibexecdir)")
788 for i in $(INSTALL_LIBEXEC_SCRIPTS); do \
789 $(call INSTALL_SCRIPT,$(INSTALL_OPTS),$$i,"$(DESTDIR)$(ghclibexecdir)"); \
793 install_libexecs: $(INSTALL_LIBEXECS)
794 ifeq "$(INSTALL_LIBEXECS)" ""
797 $(call INSTALL_DIR,"$(DESTDIR)$(ghclibexecdir)")
798 for i in $(INSTALL_LIBEXECS); do \
799 $(call INSTALL_PROGRAM,$(INSTALL_BIN_OPTS),$$i,"$(DESTDIR)$(ghclibexecdir)"); \
801 # We rename ghc-stage2, so that the right program name is used in error
803 "$(MV)" "$(DESTDIR)$(ghclibexecdir)/ghc-stage2" "$(DESTDIR)$(ghclibexecdir)/ghc"
806 install_topdirs: $(INSTALL_TOPDIRS)
807 $(call INSTALL_DIR,"$(DESTDIR)$(topdir)")
808 for i in $(INSTALL_TOPDIRS); do \
809 $(call INSTALL_PROGRAM,$(INSTALL_BIN_OPTS),$$i,"$(DESTDIR)$(topdir)"); \
812 install_headers: $(INSTALL_HEADERS)
813 $(call INSTALL_DIR,"$(DESTDIR)$(ghcheaderdir)")
814 for i in $(INSTALL_HEADERS); do \
815 $(call INSTALL_HEADER,$(INSTALL_OPTS),$$i,"$(DESTDIR)$(ghcheaderdir)"); \
818 install_docs: $(INSTALL_DOCS)
819 $(call INSTALL_DIR,"$(DESTDIR)$(docdir)")
820 ifneq "$(INSTALL_DOCS)" ""
821 for i in $(INSTALL_DOCS); do \
822 $(call INSTALL_DOC,$(INSTALL_OPTS),$$i,"$(DESTDIR)$(docdir)"); \
825 $(call INSTALL_DIR,"$(DESTDIR)$(docdir)/html")
826 $(call INSTALL_DOC,$(INSTALL_OPTS),docs/index.html,"$(DESTDIR)$(docdir)/html")
827 ifneq "$(INSTALL_LIBRARY_DOCS)" ""
828 $(call INSTALL_DIR,"$(DESTDIR)$(docdir)/html/libraries")
829 for i in $(INSTALL_LIBRARY_DOCS); do \
830 $(call INSTALL_DOC,$(INSTALL_OPTS),$$i,"$(DESTDIR)$(docdir)/html/libraries/"); \
832 $(call INSTALL_DATA,$(INSTALL_OPTS),libraries/prologue.txt,"$(DESTDIR)$(docdir)/html/libraries/")
833 $(call INSTALL_SCRIPT,$(INSTALL_OPTS),libraries/gen_contents_index,"$(DESTDIR)$(docdir)/html/libraries/")
835 ifneq "$(INSTALL_HTML_DOC_DIRS)" ""
836 for i in $(INSTALL_HTML_DOC_DIRS); do \
837 $(call INSTALL_DIR,"$(DESTDIR)$(docdir)/html/`basename $$i`"); \
838 $(call INSTALL_DOC,$(INSTALL_OPTS),$$i/*,"$(DESTDIR)$(docdir)/html/`basename $$i`"); \
842 INSTALLED_PACKAGE_CONF=$(DESTDIR)$(topdir)/package.conf.d
844 # Install packages in the right order, so that ghc-pkg doesn't complain.
845 # Also, install ghc-pkg first.
846 ifeq "$(Windows)" "NO"
847 INSTALLED_GHC_REAL=$(DESTDIR)$(ghclibexecdir)/ghc
848 INSTALLED_GHC_PKG_REAL=$(DESTDIR)$(ghclibexecdir)/ghc-pkg
850 INSTALLED_GHC_REAL=$(DESTDIR)$(bindir)/ghc.exe
851 INSTALLED_GHC_PKG_REAL=$(DESTDIR)$(bindir)/ghc-pkg.exe
854 INSTALLED_PKG_DIRS := $(addprefix libraries/,$(PACKAGES)) \
856 $(addprefix libraries/,$(PACKAGES_STAGE2))
857 ifeq "$(InstallExtraPackages)" "NO"
858 INSTALLED_PKG_DIRS := $(filter-out $(addprefix libraries/,$(EXTRA_PACKAGES)),\
859 $(INSTALLED_PKG_DIRS))
861 INSTALLED_PKG_DIRS := $(filter-out $(addprefix libraries/,$(INTREE_ONLY_PACKAGES)),\
862 $(INSTALLED_PKG_DIRS))
864 # Set the INSTALL_DISTDIR_p for each package; compiler is special
865 $(foreach p,$(filter-out compiler,$(INSTALLED_PKG_DIRS)),\
866 $(eval INSTALL_DISTDIR_$p = dist-install))
867 INSTALL_DISTDIR_compiler = stage2
869 # Now we can do the installation
870 install_packages: install_libexecs
871 install_packages: libffi/package.conf.install rts/package.conf.install
872 $(call INSTALL_DIR,"$(DESTDIR)$(topdir)")
873 "$(RM)" $(RM_OPTS_REC) "$(INSTALLED_PACKAGE_CONF)"
874 $(call INSTALL_DIR,"$(INSTALLED_PACKAGE_CONF)")
875 "$(INSTALLED_GHC_PKG_REAL)" --force --global-conf "$(INSTALLED_PACKAGE_CONF)" update libffi/package.conf.install
876 "$(INSTALLED_GHC_PKG_REAL)" --force --global-conf "$(INSTALLED_PACKAGE_CONF)" update rts/package.conf.install
877 $(foreach p, $(INSTALLED_PKG_DIRS), \
878 $(call make-command, \
879 "$(GHC_CABAL_INPLACE)" install \
880 "$(INSTALLED_GHC_REAL)" \
881 "$(INSTALLED_GHC_PKG_REAL)" \
883 "$(DESTDIR)$(topdir)" \
884 $p $(INSTALL_DISTDIR_$p) \
888 '$(docdir)/html/libraries' \
889 $(RelocatableBuild)))
890 $(foreach p, $(HIDDEN_PACKAGES), \
891 $(call make-command, \
892 "$(INSTALLED_GHC_PKG_REAL)" \
893 --global-conf "$(INSTALLED_PACKAGE_CONF)" hide $p))
895 # -----------------------------------------------------------------------------
896 # Binary distributions
898 ifneq "$(CLEANING)" "YES"
899 # This rule seems to hold some files open on Windows which prevents
900 # cleaning, perhaps due to the $(wildcard).
902 $(eval $(call bindist,.,\
906 configure config.sub config.guess install-sh \
911 $(INPLACE_BIN)/mkdirhier \
912 utils/ghc-cabal/dist-install/build/tmp/ghc-cabal \
913 utils/ghc-pwd/dist/build/tmp/ghc-pwd \
914 $(BINDIST_WRAPPERS) \
915 $(BINDIST_PERL_SOURCES) \
919 $(includes_H_CONFIG) \
920 $(includes_H_PLATFORM) \
921 $(includes_H_FILES) \
922 includes/ghcconfig.h \
924 $(INSTALL_LIBEXECS) \
925 $(INSTALL_LIBEXEC_SCRIPTS) \
928 $(INSTALL_MANPAGES) \
930 $(INSTALL_LIBRARY_DOCS) \
931 $(addsuffix /*,$(INSTALL_HTML_DOC_DIRS)) \
933 compiler/stage2/doc \
934 $(wildcard libraries/*/dist-install/doc/) \
935 $(wildcard libraries/*/*/dist-install/doc/) \
936 $(filter-out settings,$(INSTALL_LIBS)) \
937 $(filter-out %/project.mk mk/config.mk %/mk/install.mk,$(MAKEFILE_LIST)) \
941 libraries/gen_contents_index \
942 libraries/prologue.txt \
943 $(wildcard libraries/dph/LICENSE \
944 libraries/dph/ghc-packages \
945 libraries/dph/ghc-packages2 \
946 libraries/dph/ghc-stage2-package) \
949 # mk/project.mk gets an absolute path, so we manually include it in
950 # the bindist with a relative path
952 BIN_DIST_MK = $(BIN_DIST_PREP_DIR)/bindist.mk
954 unix-binary-dist-prep:
955 "$(RM)" $(RM_OPTS_REC) bindistprep/
956 "$(MKDIRHIER)" $(BIN_DIST_PREP_DIR)
957 set -e; for i in packages LICENSE compiler ghc rts libraries utils docs libffi includes driver mk rules Makefile aclocal.m4 config.sub config.guess install-sh settings.in ghc.mk inplace distrib/configure.ac distrib/README distrib/INSTALL; do ln -s ../../$$i $(BIN_DIST_PREP_DIR)/; done
958 echo "HADDOCK_DOCS = $(HADDOCK_DOCS)" >> $(BIN_DIST_MK)
959 echo "LATEX_DOCS = $(LATEX_DOCS)" >> $(BIN_DIST_MK)
960 echo "BUILD_DOCBOOK_HTML = $(BUILD_DOCBOOK_HTML)" >> $(BIN_DIST_MK)
961 echo "BUILD_DOCBOOK_PS = $(BUILD_DOCBOOK_PS)" >> $(BIN_DIST_MK)
962 echo "BUILD_DOCBOOK_PDF = $(BUILD_DOCBOOK_PDF)" >> $(BIN_DIST_MK)
963 echo "BUILD_MAN = $(BUILD_MAN)" >> $(BIN_DIST_MK)
964 echo "GHC_CABAL_INPLACE = utils/ghc-cabal/dist-install/build/tmp/ghc-cabal" >> $(BIN_DIST_MK)
965 cd $(BIN_DIST_PREP_DIR) && autoreconf
966 "$(RM)" $(RM_OPTS) $(BIN_DIST_PREP_TAR)
967 # h means "follow symlinks", e.g. if aclocal.m4 is a symlink to a source
968 # tree then we want to include the real file, not a symlink to it
969 cd bindistprep && "$(TAR_CMD)" hcf - -T ../$(BIN_DIST_LIST) | bzip2 -c > ../$(BIN_DIST_PREP_TAR_BZ2)
971 windows-binary-dist-prep:
972 "$(RM)" $(RM_OPTS_REC) bindistprep/
973 $(MAKE) prefix=$(TOP)/$(BIN_DIST_PREP_DIR) install
974 cd bindistprep && "$(TAR_CMD)" cf - $(BIN_DIST_NAME) | bzip2 -c > ../$(BIN_DIST_PREP_TAR_BZ2)
977 ifeq "$(ISCC_CMD)" ""
978 @echo No ISCC_CMD, so not making installer
980 "$(ISCC_CMD)" /O. /Fbindistprep/$(WINDOWS_INSTALLER_BASE) - < distrib/ghc.iss
983 # tryTimes tries to run its third argument multiple times, until it
984 # succeeds. Don't call it directly; call try10Times instead.
985 # The first and second argument to tryTimes are lists of values.
986 # The length of the first argument is the number of times we have
987 # already tried. The length of the second argument is the number more
989 tryTimes = $(if $2, \
990 { echo 'Try $(words x $1): $3' ; $3 ; } || \
991 $(call tryTimes,x $1,$(wordlist 2,$(words $2),$2),$3), \
994 # Try to run the argument 10 times. If all 10 fail, fail.
995 try10Times = $(call tryTimes,,x x x x x x x x x x,$1) { echo Failed; false; }
997 .PHONY: publish-binary-dist
999 $(call try10Times,$(PublishCp) $(BIN_DIST_TAR_BZ2) $(PublishLocation)/dist)
1000 ifeq "$(mingw32_TARGET_OS)" "1"
1001 $(call try10Times,$(PublishCp) $(WINDOWS_INSTALLER) $(PublishLocation)/dist)
1004 ifeq "$(mingw32_TARGET_OS)" "1"
1005 DOCDIR_TO_PUBLISH = bindisttest/"install dir"/doc
1007 DOCDIR_TO_PUBLISH = bindisttest/"install dir"/share/doc/ghc
1010 .PHONY: publish-docs
1012 $(call try10Times,$(PublishCp) -r $(DOCDIR_TO_PUBLISH)/* $(PublishLocation)/docs)
1014 # -----------------------------------------------------------------------------
1015 # Source distributions
1023 # A source dist is built from a complete build tree, because we
1024 # require some extra files not contained in a darcs checkout: the
1025 # output from Happy and Alex, for example.
1027 # The steps performed by 'make dist' are as follows:
1028 # - create a complete link-tree of the current build tree in /tmp
1029 # - run 'make distclean' on that tree
1030 # - remove a bunch of other files that we know shouldn't be in the dist
1031 # - tar up first the extralibs package, then the main source package
1034 # Directory in which we're going to build the src dist
1036 SRC_DIST_NAME=ghc-$(ProjectVersion)
1037 SRC_DIST_DIR=$(TOP)/$(SRC_DIST_NAME)
1040 # Files to include in source distributions
1042 SRC_DIST_DIRS = mk rules docs distrib bindisttest libffi includes utils docs rts compiler ghc driver libraries ghc-tarballs
1044 configure.ac config.guess config.sub configure \
1045 aclocal.m4 README ANNOUNCE HACKING LICENSE Makefile install-sh \
1046 ghc.spec.in ghc.spec settings.in VERSION \
1047 boot boot-pkgs packages ghc.mk
1049 SRC_DIST_TARBALL = $(SRC_DIST_NAME)-src.tar.bz2
1052 echo $(ProjectVersion) >VERSION
1057 # $(call sdist_file,compiler,stage2,cmm,Foo/Bar,CmmLex,x)
1058 # to copy the generated file that replaces compiler/cmm/Foo/Bar/CmmLex.x, where
1059 # "stage2" is the dist dir.
1061 "$(CP)" $1/$2/build/$4/$5.hs $(SRC_DIST_DIR)/$1/$3/$4
1062 mv $(SRC_DIST_DIR)/$1/$3/$4/$5.$6 $(SRC_DIST_DIR)/$1/$3/$4/$5.$6.source
1067 "$(RM)" $(RM_OPTS_REC) $(SRC_DIST_DIR)
1068 "$(RM)" $(RM_OPTS) $(SRC_DIST_TARBALL)
1069 mkdir $(SRC_DIST_DIR)
1070 cd $(SRC_DIST_DIR) && for i in $(SRC_DIST_DIRS); do mkdir $$i; ( cd $$i && lndir $(TOP)/$$i ); done
1071 cd $(SRC_DIST_DIR) && for i in $(SRC_DIST_FILES); do $(LN_S) $(TOP)/$$i .; done
1072 cd $(SRC_DIST_DIR) && $(MAKE) distclean
1073 rm -rf $(SRC_DIST_DIR)/libraries/tarballs/
1074 rm -rf $(SRC_DIST_DIR)/libraries/stamp/
1075 $(call sdist_file,compiler,stage2,cmm,,CmmLex,x)
1076 $(call sdist_file,compiler,stage2,cmm,,CmmParse,y)
1077 $(call sdist_file,compiler,stage2,parser,,Lexer,x)
1078 $(call sdist_file,compiler,stage2,parser,,Parser,y.pp)
1079 $(call sdist_file,compiler,stage2,parser,,ParserCore,y)
1080 $(call sdist_file,utils/hpc,dist,,,HpcParser,y)
1081 $(call sdist_file,utils/genprimopcode,dist,,,Lexer,x)
1082 $(call sdist_file,utils/genprimopcode,dist,,,Parser,y)
1083 $(call sdist_file,utils/haddock,dist,src,Haddock,Lex,x)
1084 $(call sdist_file,utils/haddock,dist,src,Haddock,Parse,y)
1085 cd $(SRC_DIST_DIR) && "$(RM)" $(RM_OPTS_REC) compiler/stage[123] mk/build.mk
1086 cd $(SRC_DIST_DIR) && "$(FIND)" $(SRC_DIST_DIRS) \( -name _darcs -o -name SRC -o -name "autom4te*" -o -name "*~" -o -name ".cvsignore" -o -name "\#*" -o -name ".\#*" -o -name "log" -o -name "*-SAVE" -o -name "*.orig" -o -name "*.rej" -o -name "*-darcs-backup*" \) -print | "$(XARGS)" $(XARGS_OPTS) "$(RM)" $(RM_OPTS_REC)
1090 "$(TAR_CMD)" chf - $(SRC_DIST_NAME) 2>$src_log | bzip2 >$(TOP)/$(SRC_DIST_TARBALL)
1092 sdist-manifest : $(SRC_DIST_TARBALL)
1093 tar tjf $(SRC_DIST_TARBALL) | sed "s|^ghc-$(ProjectVersion)/||" | sort >sdist-manifest
1095 # Upload the distribution(s)
1096 # Retrying is to work around buggy firewalls that corrupt large file transfers
1098 ifneq "$(PublishLocation)" ""
1100 $(call try10Times,$(PublishCp) $(SRC_DIST_TARBALL) $(PublishLocation)/dist)
1103 ifeq "$(BootingFromHc)" "YES"
1104 # In a normal build we use GHC to compile C files (see
1105 # rules/c-suffix-rules.mk), which passes a number of its own options
1106 # to the C compiler. So when bootstrapping we have to provide these
1107 # flags explicitly to C compilations.
1108 SRC_CC_OPTS += -DNO_REGS -DUSE_MINIINTERPRETER
1109 SRC_CC_OPTS += -D__GLASGOW_HASKELL__=$(ProjectVersionInt)
1110 SRC_CC_OPTS += -I$(GHC_INCLUDE_DIR)
1113 # -----------------------------------------------------------------------------
1114 # sdisting libraries
1116 # Use manually, with e.g.:
1117 # make sdist_directory
1120 inplace/bin/ghc-cabal sdist libraries/$* dist-install
1122 # -----------------------------------------------------------------------------
1127 CLEAN_FILES += libraries/bootstrapping.conf
1128 CLEAN_FILES += libraries/integer-gmp/cbits/GmpDerivedConstants.h
1129 CLEAN_FILES += libraries/integer-gmp/cbits/mkGmpDerivedConstants
1131 clean : clean_files clean_libraries
1135 "$(RM)" $(RM_OPTS) $(CLEAN_FILES)
1137 .PHONY: clean_libraries
1138 clean_libraries: $(patsubst %,clean_libraries/%_dist-install,$(PACKAGES) $(PACKAGES_STAGE2))
1139 clean_libraries: $(patsubst %,clean_libraries/%_dist-boot,$(STAGE0_PACKAGES))
1142 "$(RM)" $(RM_OPTS_REC) $(patsubst %, libraries/%/dist, $(PACKAGES) $(PACKAGES_STAGE2))
1143 "$(RM)" $(RM_OPTS) $(patsubst %, libraries/%/*.buildinfo, $(PACKAGES) $(PACKAGES_STAGE2))
1145 # We have to define a clean target for each library manually, because the
1146 # libraries/*/ghc.mk files are not included when we're cleaning.
1147 ifeq "$(CLEANING)" "YES"
1148 $(foreach lib,$(PACKAGES) $(PACKAGES_STAGE2),\
1149 $(eval $(call clean-target,libraries/$(lib),dist-install,libraries/$(lib)/dist-install)))
1152 clean : clean_bindistprep
1153 .PHONY: clean_bindistprep
1155 "$(RM)" $(RM_OPTS_REC) bindistprep/
1158 "$(RM)" $(RM_OPTS) config.cache config.status config.log mk/config.h mk/stamp-h
1159 "$(RM)" $(RM_OPTS) mk/config.mk mk/are-validating.mk mk/project.mk
1160 "$(RM)" $(RM_OPTS) mk/config.mk.old mk/project.mk.old
1161 "$(RM)" $(RM_OPTS) settings docs/users_guide/ug-book.xml
1162 "$(RM)" $(RM_OPTS) compiler/ghc.cabal compiler/ghc.cabal.old
1163 "$(RM)" $(RM_OPTS) ghc/ghc-bin.cabal
1164 "$(RM)" $(RM_OPTS) libraries/base/include/HsBaseConfig.h
1165 "$(RM)" $(RM_OPTS) libraries/directory/include/HsDirectoryConfig.h
1166 "$(RM)" $(RM_OPTS) libraries/process/include/HsProcessConfig.h
1167 "$(RM)" $(RM_OPTS) libraries/unix/include/HsUnixConfig.h
1168 "$(RM)" $(RM_OPTS) libraries/old-time/include/HsTimeConfig.h
1169 "$(RM)" $(RM_OPTS_REC) utils/ghc-pwd/dist
1170 "$(RM)" $(RM_OPTS_REC) inplace
1172 "$(RM)" $(RM_OPTS) $(patsubst %, libraries/%/config.log, $(PACKAGES) $(PACKAGES_STAGE2))
1173 "$(RM)" $(RM_OPTS) $(patsubst %, libraries/%/config.status, $(PACKAGES) $(PACKAGES_STAGE2))
1174 "$(RM)" $(RM_OPTS) $(patsubst %, libraries/%/include/Hs*Config.h, $(PACKAGES) $(PACKAGES_STAGE2))
1175 "$(RM)" $(RM_OPTS_REC) $(patsubst %, libraries/%/autom4te.cache, $(PACKAGES) $(PACKAGES_STAGE2))
1177 maintainer-clean : distclean
1178 "$(RM)" $(RM_OPTS) configure mk/config.h.in
1179 "$(RM)" $(RM_OPTS_REC) autom4te.cache libraries/*/autom4te.cache
1180 "$(RM)" $(RM_OPTS) ghc.spec
1181 "$(RM)" $(RM_OPTS) $(patsubst %, libraries/%/GNUmakefile, \
1182 $(PACKAGES) $(PACKAGES_STAGE2))
1183 "$(RM)" $(RM_OPTS) $(patsubst %, libraries/%/ghc.mk, $(PACKAGES) $(PACKAGES_STAGE2))
1184 "$(RM)" $(RM_OPTS) $(patsubst %, libraries/%/configure, \
1185 $(PACKAGES) $(PACKAGES_STAGE2))
1186 "$(RM)" $(RM_OPTS) libraries/base/include/HsBaseConfig.h.in
1187 "$(RM)" $(RM_OPTS) libraries/directory/include/HsDirectoryConfig.h.in
1188 "$(RM)" $(RM_OPTS) libraries/process/include/HsProcessConfig.h.in
1189 "$(RM)" $(RM_OPTS) libraries/unix/include/HsUnixConfig.h.in
1190 "$(RM)" $(RM_OPTS) libraries/old-time/include/HsTimeConfig.h.in
1192 .PHONY: all_libraries
1194 .PHONY: bootstrapping-files
1195 bootstrapping-files: $(OTHER_LIBS)
1196 bootstrapping-files: includes/ghcautoconf.h
1197 bootstrapping-files: includes/DerivedConstants.h
1198 bootstrapping-files: includes/GHCConstants.h
1202 # -----------------------------------------------------------------------------
1203 # Numbered phase targets
1205 .PHONY: phase_0_builds
1206 phase_0_builds: $(utils/hsc2hs_dist_depfile_haskell)
1207 phase_0_builds: $(utils/hsc2hs_dist_depfile_c_asm)
1208 phase_0_builds: $(utils/genprimopcode_dist_depfile_haskell)
1209 phase_0_builds: $(utils/genprimopcode_dist_depfile_c_asm)
1211 .PHONY: phase_1_builds
1212 phase_1_builds: $(PACKAGE_DATA_MKS)