summaryrefslogtreecommitdiff
path: root/rules
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
parent47e00ec4a85b492a1e9f8750b4ba12963a10d76a (diff)
downloadhaskell-b0885e467990e9843f11b2b9d5ceb5d3b3109132.tar.gz
Build system: whitespace and comments only
[skip ci]
Diffstat (limited to 'rules')
-rw-r--r--rules/build-prog.mk15
-rw-r--r--rules/shell-wrapper.mk9
2 files changed, 18 insertions, 6 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))
diff --git a/rules/shell-wrapper.mk b/rules/shell-wrapper.mk
index ae38e65d34..6b84072537 100644
--- a/rules/shell-wrapper.mk
+++ b/rules/shell-wrapper.mk
@@ -20,6 +20,7 @@ ifeq "$$($1_$2_SHELL_WRAPPER_NAME)" ""
$1_$2_SHELL_WRAPPER_NAME = $1/$$($1_$2_PROGNAME).wrapper
endif
+
ifeq "$$($1_$2_WANT_INPLACE_WRAPPER)" "YES"
$1_$2_INPLACE_SHELL_WRAPPER_NAME = $$($1_$2_PROG)
@@ -56,7 +57,8 @@ else
endif
$$(EXECUTABLE_FILE) $$@
-endif
+endif # $1_$2_WANT_INPLACE_WRAPPER
+
ifeq "$$($1_$2_WANT_INSTALLED_WRAPPER)" "YES"
@@ -88,7 +90,8 @@ install_$1_$2_wrapper:
cat $$($1_$2_SHELL_WRAPPER_NAME) >> "$$(WRAPPER)"
$$(EXECUTABLE_FILE) "$$(WRAPPER)"
-endif
+endif # $1_$2_WANT_INSTALLED_WRAPPER
+
ifeq "$$($1_$2_WANT_BINDIST_WRAPPER)" "YES"
ifneq "$$(TargetOS_CPP)" "mingw32"
@@ -109,7 +112,7 @@ endif
$$(EXECUTABLE_FILE) $$@
endif
-endif
+endif # $1_$2_WANT_BINDIST_WRAPPER
$(call profEnd, shell-wrapper($1,$2))
endef