summaryrefslogtreecommitdiff
path: root/rules/build-prog.mk
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2015-05-26 18:31:43 +0200
committerThomas Miedema <thomasmiedema@gmail.com>2015-05-30 16:49:26 +0200
commitb0885e467990e9843f11b2b9d5ceb5d3b3109132 (patch)
treef2074ead04dae85d2e201aee5f1baca9900097c4 /rules/build-prog.mk
parent47e00ec4a85b492a1e9f8750b4ba12963a10d76a (diff)
downloadhaskell-b0885e467990e9843f11b2b9d5ceb5d3b3109132.tar.gz
Build system: whitespace and comments only
[skip ci]
Diffstat (limited to 'rules/build-prog.mk')
-rw-r--r--rules/build-prog.mk15
1 files changed, 12 insertions, 3 deletions
diff --git a/rules/build-prog.mk b/rules/build-prog.mk
index 939570423a..b32a7a0e6e 100644
--- a/rules/build-prog.mk
+++ b/rules/build-prog.mk
@@ -47,6 +47,10 @@ $(call profEnd, build-prog($1,$2,$3))
endef
+
+
+
+
define build-prog-vars
# $1 = dir
# $2 = distdir
@@ -107,6 +111,10 @@ endif
endef
+
+
+
+
define build-prog-helper
# $1 = dir
# $2 = distdir
@@ -181,6 +189,7 @@ $1_$2_$$($1_$2_PROGRAM_WAY)_GHC_LD_OPTS += -no-auto-link-packages -no-hs-main
endif
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
$1/$2/build/tmp/$$($1_$2_PROG) $1/$2/build/tmp/$$($1_$2_PROG).dll : \
@@ -252,7 +261,7 @@ $1/$2/build/tmp/$$($1_$2_PROG) : $1/$2/build/tmp/$$($1_$2_PROG)-wrapper.c $1/$2/
$1/$2/build/tmp/$$($1_$2_PROG).dll : $$($1_$2_$$($1_$2_PROGRAM_WAY)_HS_OBJS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_C_OBJS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_S_OBJS) $$($1_$2_OTHER_OBJS) | $$$$(dir $$$$@)/.
$$(call build-dll,$1,$2,$$($1_$2_PROGRAM_WAY),,$$($1_$2_$$($1_$2_PROGRAM_WAY)_HS_OBJS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_C_OBJS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_S_OBJS) $$($1_$2_OTHER_OBJS),$$@)
-else
+else # $1_$2_PROG_NEEDS_C_WRAPPER=NO
ifeq "$$($1_$2_LINK_WITH_GCC)" "NO"
$1/$2/build/tmp/$$($1_$2_PROG) : $$($1_$2_$$($1_$2_PROGRAM_WAY)_HS_OBJS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_C_OBJS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_S_OBJS) $$($1_$2_OTHER_OBJS) | $$$$(dir $$$$@)/.
$$(call cmd,$1_$2_HC) -o $$@ $$($1_$2_$$($1_$2_PROGRAM_WAY)_ALL_HC_OPTS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_GHC_LD_OPTS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_HS_OBJS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_C_OBJS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_S_OBJS) $$($1_$2_OTHER_OBJS) $$(addprefix -l,$$($1_$2_EXTRA_LIBRARIES))
@@ -261,7 +270,7 @@ else
$1/$2/build/tmp/$$($1_$2_PROG) : $$($1_$2_$$($1_$2_PROGRAM_WAY)_HS_OBJS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_C_OBJS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_S_OBJS) $$($1_$2_OTHER_OBJS) | $$$$(dir $$$$@)/.
$$(call cmd,$1_$2_CC) -o $$@ $$($1_$2_$$($1_$2_PROGRAM_WAY)_ALL_CC_OPTS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_ALL_LD_OPTS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_HS_OBJS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_C_OBJS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_S_OBJS) $$($1_$2_OTHER_OBJS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_EXTRA_CC_OPTS) $$(addprefix -l,$$($1_$2_EXTRA_LIBRARIES))
endif
-endif
+endif # $1_$2_PROG_NEEDS_C_WRAPPER
# Note [lib-depends] if this program is built with stage1 or greater, we
# need to depend on the libraries too. NB. since $(ALL_STAGE1_LIBS) and
@@ -286,7 +295,7 @@ $$($1_$2_INPLACE) : $1/$2/build/tmp/$$($1_$2_PROG_INPLACE) | $$$$(dir $$$$@)/.
endif
endif
-endif
+endif # BINDIST=YES
ifneq "$$($1_$2_INSTALL_INPLACE)" "NO"
$(call all-target,$1_$2,$$($1_$2_INPLACE))