default : all
@:
+ifneq "$(findstring clean,$(MAKECMDGOALS))" ""
+-include mk/config.mk
+else
include mk/config.mk
-
ifeq "$(ProjectVersion)" ""
$(error Please run ./configure first)
endif
+endif
include mk/custom-settings.mk
# -----------------------------------------------------------------------------
# Include subsidiary build-system bits
+ifneq "$(findstring clean,$(MAKECMDGOALS))" ""
+-include mk/config.mk
+else
include mk/config.mk
-
ifeq "$(ProjectVersion)" ""
$(error Please run ./configure first)
endif
+endif
# (Optional) build-specific configuration
include mk/custom-settings.mk
+ifeq "$(findstring clean,$(MAKECMDGOALS))" ""
ifeq "$(GhcLibWays)" ""
$(error $$(GhcLibWays) is empty, it must contain at least one way)
endif
+endif
# -----------------------------------------------------------------------------
# Macros for standard targets
ifneq "$(BINDIST)" "YES"
+ifneq "$(BOOTSTRAPPING_CONF)" ""
ifeq "$(wildcard $(BOOTSTRAPPING_CONF))" ""
$(shell echo "[]" >$(BOOTSTRAPPING_CONF))
endif
+endif
$(eval $(call clean-target,$(BOOTSTRAPPING_CONF),,$(BOOTSTRAPPING_CONF)))
$(call all-target,$1_$2,$$($1_$2_INPLACE))
$(call clean-target,$1,$2_inplace,$$($1_$2_INPLACE))
+# INPLACE_BIN might be empty if we're distcleaning
+ifneq "$$(INPLACE_BIN)" ""
$$($1_$2_INPLACE) : $1/$2/build/tmp/$$($1_$2_PROG) $$(MKDIRHIER)
$$(MKDIRHIER) $$(dir $$@)
$$(CP) -p $$< $$@
touch $$@
+endif
# touch is necessary; cp doesn't update the file time.
endif