diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2021-10-24 16:54:19 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-10-27 13:29:39 -0400 |
commit | 9bd6daa4af5893b9da97e75060248a8c2faf3b0b (patch) | |
tree | 9a1ac50a341db929810e7e9a3f3e7af74ec9693c /rules/build-prog.mk | |
parent | cc113616401b653020de081ec3ea5f2ec64747d9 (diff) | |
download | haskell-9bd6daa4af5893b9da97e75060248a8c2faf3b0b.tar.gz |
Make build system: Generalize and/or document distdirs
`manual-package-config` should not hard-code the distdir, and no
longer does
Elsewhere, we must continue to hard-code due to inconsitent distdir
names across stages, so we document this referring to the existing note
"inconsistent distdirs".
Diffstat (limited to 'rules/build-prog.mk')
-rw-r--r-- | rules/build-prog.mk | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rules/build-prog.mk b/rules/build-prog.mk index f44fce9147..84d717e6b6 100644 --- a/rules/build-prog.mk +++ b/rules/build-prog.mk @@ -196,6 +196,10 @@ ifneq "$$(BINDIST)" "YES" # The quadrupled $'s here are because the _<way>_LIB variables aren't # necessarily set when this part of the makefile is read +# +# See Note [inconsistent distdirs] in rules/build-package-way.mk for why +# we are computing the dist-dir from the GHC stage and not just using +# the distdir parameter. $1/$2/build/tmp/$$($1_$2_PROG) $1/$2/build/tmp/$$($1_$2_PROG).dll : \ $$(foreach dep,$$($1_$2_TRANSITIVE_DEP_COMPONENT_IDS),\ $$$$($$(dep)_dist-$(if $(filter 0,$3),boot,install)_PROGRAM_DEP_LIB)) @@ -319,6 +323,10 @@ $(call dependencies,$1,$2,$3) # so we need to add a dependency for that. As we don't know which # module contains Main, we just make all modules in the program # depend on it. +# +# See Note [inconsistent distdirs] in rules/build-package-way.mk for why +# we hard-code dist-install; GHC will use stage2/stage3 here so we +# cannot use the distdir parameter. ifneq "$3" "0" $$(foreach o,$$($1_$2_$$($1_$2_PROGRAM_WAY)_HS_OBJS),$$(eval $$(call add-dependency,$$o,libraries/base/dist-install/build/GHC/TopHandler.$$($$($1_$2_PROGRAM_WAY)_osuf)))) endif |