6 ifneq (,$(filter build,$(MAKECMDGOALS)))
7 rule_targets = $(value $(1)_targets)
8 rule_deps = $(value $(1)_deps)
9 rule_msg = $(value $(1)_msg)
10 rule_cmd = $(value $(1)_cmd)
12 # Usage: $(eval $(call build_rule,<target>))
14 $(rule_targets): $(rule_deps) #$(omk_inc_file)
15 @$(QUIET_CMD_ECHO) " "$(rule_msg)"$$@" #"$$(call strip_out,$$@)"
19 # Goals are included only for this directory and all subdirectories
20 # TODO: What if a target depends on a library from different
21 # subtree. Then the library would be remade even if it should not
22 # because its __goals.omk.inc is not included.
23 -include $(shell true; find $(OMK_WORK_DIR) -name '__goals.omk.inc') # `true' is a hack for MinGW
25 # Definition of rules is included everywhere to allow multi-directory
27 -include $(shell true; find $(BUILD_OMK_DIR) -name '*.omk.inc' -not -name '__goals.omk.inc') # `true' is a hack for MinGW
29 # FIXME: Disable automatic remake of included files
31 $(foreach rule,$(prepared_rules),$(eval $(call build_rule,$(rule))))
37 endif # (,$(filter build,$(MAKECMDGOALS)))