1 # -----------------------------------------------------------------------------
3 # (c) 2009 The University of Glasgow
5 # This file is part of the GHC build system.
7 # To understand how the build system works and how to modify it, see
8 # http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
9 # http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
11 # -----------------------------------------------------------------------------
13 define include-dependencies
14 $(call trace, include-dependencies($1,$2,$3))
15 $(call profStart, include-dependencies($1,$2,$3))
18 # $3 = GHC stage to use (0 == bootstrapping compiler)
20 $1_$2_INCLUDE_DEPFILES = YES
21 ifeq "$$(NO_INCLUDE_DEPS)" "YES"
22 $1_$2_INCLUDE_DEPFILES = NO
24 ifneq "$$(ONLY_DEPS_FOR)" ""
25 ifeq "$$(filter $1_$2,$$(ONLY_DEPS_FOR))" ""
26 $1_$2_INCLUDE_DEPFILES = NO
30 ifeq "$$($1_$2_INCLUDE_DEPFILES)" "YES"
31 ifneq "$$(strip $$($1_$2_HS_SRCS) $$($1_$2_HS_BOOT_SRCS))" ""
32 ifneq "$$(NO_STAGE$3_DEPS)" "YES"
33 include $$($1_$2_depfile_haskell)
36 include $$($1_$2_depfile_c_asm)
38 ifeq "$$(DEBUG)" "YES"
39 $$(warning not building dependencies in $1)
43 $(call profEnd, include-dependencies($1,$2,$3))