diff options
author | Ian Lynagh <ian@well-typed.com> | 2013-02-21 14:31:34 +0000 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2013-02-21 14:32:06 +0000 |
commit | 676235fd5d3df209349bacc9047be321fe308c44 (patch) | |
tree | ab4631660c993479b24be7c0043052268b6b91ff /rules/hs-suffix-way-rules.mk | |
parent | 2e010ce03d1b3c34a7f8b023dd76f1f5fc67dc9e (diff) | |
download | haskell-676235fd5d3df209349bacc9047be321fe308c44.tar.gz |
Rename hs-suffix-rules to hs-suffix-way-rules
Diffstat (limited to 'rules/hs-suffix-way-rules.mk')
-rw-r--r-- | rules/hs-suffix-way-rules.mk | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/rules/hs-suffix-way-rules.mk b/rules/hs-suffix-way-rules.mk new file mode 100644 index 0000000000..50097cbf23 --- /dev/null +++ b/rules/hs-suffix-way-rules.mk @@ -0,0 +1,41 @@ +# ----------------------------------------------------------------------------- +# +# (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 hs-suffix-way-rules # args: $1 = dir, $2 = distdir, $3 = way + +ifneq "$$(BINDIST)" "YES" + +$1/$2/build/%.$$($3_hcsuf) : $1/$2/build/%.hs $$(LAX_DEPS_FOLLOW) $$($1_$2_HC_DEP) + $$(call cmd,$1_$2_HC) $$($1_$2_$3_ALL_HC_OPTS) -C $$< -o $$@ + +$1/$2/build/%.$$($3_osuf) : $1/$2/build/%.hs $$(LAX_DEPS_FOLLOW) $$($1_$2_HC_DEP) + $$(call cmd,$1_$2_HC) $$($1_$2_$3_ALL_HC_OPTS) -c $$< -o $$@ + +$1/$2/build/%.$$($3_hcsuf) : $1/$2/build/autogen/%.hs $$(LAX_DEPS_FOLLOW) $$($1_$2_HC_DEP) + $$(call cmd,$1_$2_HC) $$($1_$2_$3_ALL_HC_OPTS) -C $$< -o $$@ + +$1/$2/build/%.$$($3_osuf) : $1/$2/build/autogen/%.hs $$(LAX_DEPS_FOLLOW) $$($1_$2_HC_DEP) + $$(call cmd,$1_$2_HC) $$($1_$2_$3_ALL_HC_OPTS) -c $$< -o $$@ + +endif + +$$(foreach dir,$$($1_$2_HS_SRC_DIRS),\ + $$(eval $$(call hs-suffix-rules-srcdir,$1,$2,$3,$$(dir)))) + +$(call hi-rule,$1/$2/build,$1/$2/build,$3) +$(call hi-rule,$1/$2/build/autogen,$1/$2/build,$3) +$$(foreach dir,$$($1_$2_HS_SRC_DIRS),\ + $$(eval $$(call hi-rule,$1/$$(dir),$1/$2/build,$3))) + +endef # hs-suffix-way-rules + |