X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rules%2Fbuild-dependencies.mk;h=2ab503f1b6a33018adf1325f5bfd0a03a906f85b;hb=b07f975aa0bf4cd638db0003750ccd5e92816bc9;hp=860a2f6ff316b61fce7ae31a1190ea5b16d02898;hpb=34cc75e1a62638f2833815746ebce0a9114dc26b;p=ghc-hetmet.git diff --git a/rules/build-dependencies.mk b/rules/build-dependencies.mk index 860a2f6..2ab503f 100644 --- a/rules/build-dependencies.mk +++ b/rules/build-dependencies.mk @@ -1,3 +1,15 @@ +# ----------------------------------------------------------------------------- +# +# (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 build-dependencies # args: $1 = dir, $2 = distdir @@ -10,17 +22,17 @@ endif ifneq "$$($1_$2_NO_BUILD_DEPS)" "YES" $$($1_$2_depfile) : $$(MKDIRHIER) $$(MKDEPENDC) $$($1_$2_HS_SRCS) $$($1_$2_HS_BOOT_SRCS) $$($1_$2_HC_MK_DEPEND_DEP) $$($1_$2_C_FILES) $$($1_$2_S_FILES) - $$(MKDIRHIER) $1/$2/build - $(RM) $$@ $$@.tmp + "$$(MKDIRHIER)" $1/$2/build + "$$(RM)" $$(RM_OPTS) $$@.tmp touch $$@.tmp ifneq "$$($1_$2_C_SRCS)$$($1_$2_S_SRCS)" "" - $$(MKDEPENDC) -f $$($1_$2_depfile).tmp $$($1_MKDEPENDC_OPTS) $$(foreach way,$$($1_WAYS),-s $$(way)) -- $$($1_$2_v_ALL_CC_OPTS) -- $$($1_$2_C_FILES) $$($1_$2_S_FILES) || ( $$(RM) $$@; exit 1 ) - sed -e "s|$1/\([^ :]*o[ :]\)|$1/$2/build/\1|g" -e "s|$(TOP)/||" <$$($1_$2_depfile).tmp >$$($1_$2_depfile) + "$$(MKDEPENDC)" -f $$($1_$2_depfile).tmp $$($1_MKDEPENDC_OPTS) $$(foreach way,$$($1_WAYS),-s $$(way)) -- $$($1_$2_v_ALL_CC_OPTS) -- $$($1_$2_C_FILES) $$($1_$2_S_FILES) + sed -e "s|$1/\([^ :]*o[ :]\)|$1/$2/build/\1|g" -e "s|$$(TOP)/||" <$$($1_$2_depfile).tmp >$$($1_$2_depfile) endif ifneq "$$($1_$2_HS_SRCS)" "" - $$($1_$2_HC_MK_DEPEND) -M $$($1_$2_MKDEPENDHS_FLAGS) \ + "$$($1_$2_HC_MK_DEPEND)" -M $$($1_$2_MKDEPENDHS_FLAGS) \ $$(filter-out -split-objs, $$($1_$2_v_ALL_HC_OPTS)) \ - $$($1_$2_HS_SRCS) || ( $$(RM) $$@; exit 1 ) + $$($1_$2_HS_SRCS) endif echo "$1_$2_depfile_EXISTS = YES" >> $$@ ifneq "$$($1_$2_SLASH_MODS)" ""