diff options
author | Ian Lynagh <igloo@earth.li> | 2011-01-22 19:09:28 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2011-01-22 19:09:28 +0000 |
commit | 295016c3c0aa1f407436136e39ababf2dc8b50c6 (patch) | |
tree | 1979e477cbd3b789acf723f6c871b15bdbcc1d36 /rules/include-dependencies.mk | |
parent | d17afd1e4aa5c7a0992e5ac5b2cda325992706a8 (diff) | |
download | haskell-295016c3c0aa1f407436136e39ababf2dc8b50c6.tar.gz |
Simplify the build system, and remove 2 phases
From
http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture/Idiom/PhaseOrdering
Phase 0:
Includes: package-data.mk files for things built by the
bootstrapping compiler.
Builds: the dependency files for hsc2hs and genprimopcode. We need
to do this now, as hsc2hs needs to be buildable in phase 1's
includes (so that we can make the hpc library's .hs source
files, which in turn is necessary for making its dependency
files), and genprimopcode needs to be buildable in phase 1's
includes (so that we can make the primop-*.hs-incl files,
which are sources for the stage1 compiler library, and thus
necessary for making its dependency files).
Phase 1:
Includes: dependency files for things built by the bootstrapping
compiler.
Builds: package-data.mk files for everything else. Note that this
requires configuring the packages, which means telling cabal
which ghc to use, and thus the stage1 compiler gets built
during this phase.
Phase "":
Includes: dependency files for everything else.
Builds: Everything else.
Diffstat (limited to 'rules/include-dependencies.mk')
-rw-r--r-- | rules/include-dependencies.mk | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/rules/include-dependencies.mk b/rules/include-dependencies.mk new file mode 100644 index 0000000000..c6096f4274 --- /dev/null +++ b/rules/include-dependencies.mk @@ -0,0 +1,33 @@ +# ----------------------------------------------------------------------------- +# +# (c) 2009 The University of Glasgow +# +# This file is part of the GHC build system. +# +# To understand how the build system works and how to modify it, see +# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture +# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying +# +# ----------------------------------------------------------------------------- + +define include-dependencies +$(call trace, include-dependencies($1,$2,$3)) +# $1 = dir +# $2 = distdir +# $3 = GHC stage to use (0 == bootstrapping compiler) + +ifneq "$$(NO_INCLUDE_DEPS)" "YES" +ifneq "$$(strip $$($1_$2_HS_SRCS) $$($1_$2_HS_BOOT_SRCS))" "" +ifneq "$$(NO_STAGE$3_DEPS)" "YES" +include $$($1_$2_depfile_haskell) +endif +endif +include $$($1_$2_depfile_c_asm) +else +ifeq "$$(DEBUG)" "YES" +$$(warning not building dependencies in $1) +endif +endif + +endef + |