+
+
+#####################
+# Build pseudo-pass #
+#####################
+ifneq (,$(filter build,$(MAKECMDGOALS)))
+all: build-pseudo-pass
+
+rule_targets = $(value $(1)_targets)
+rule_deps = $(value $(1)_deps)
+rule_msg = $(value $(1)_msg)
+rule_cmd = $(value $(1)_cmd)
+
+# Usage: $(eval $(call build_rule,<target>))
+define build_rule
+$(rule_targets): $(rule_deps) #$(omk_inc_file)
+ @$(QUIET_CMD_ECHO) " "$(rule_msg)"$$@" #"$$(call strip_out,$$@)"
+ $(Q)$(rule_cmd)
+endef
+
+# TODO: Include __goals.omk.inc only in the subtree
+-include $(shell true; find $(USER_BUILD_DIR) -name '*.omk.inc') # `true' is a hack for MinGW
+# FIXME: Disable automatic remake of included files
+
+$(foreach rule,$(prepared_rules),$(eval $(call build_rule,$(rule))))
+
+.PHONY: build
+build: $(foreach target,$(omk_goals),$(target))
+endif # (,$(filter build,$(MAKECMDGOALS)))
+
+