From bc23e6f5567cdeb5ab7be04f369cb19fb3ca180e Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Sun, 18 Jan 2009 21:35:22 +0100 Subject: [PATCH] Include __goals.omk.inc only in the approproate subtree --- snippets/build.omk | 12 ++++++++++-- snippets/include.omk | 3 +++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/snippets/build.omk b/snippets/build.omk index 4182342..165f715 100644 --- a/snippets/build.omk +++ b/snippets/build.omk @@ -16,8 +16,16 @@ $(rule_targets): $(rule_deps) #$(omk_inc_file) $(Q)$(rule_cmd) endef -# TODO: Include __goals.omk.inc only in the subtree --include $(shell true; find $(BUILD_OMK_DIR) -name '*.omk.inc') # `true' is a hack for MinGW +# Goals are included only for this directory and all subdirectories +# TODO: What if a target depends on a library from different +# subtree. Then the library would be remade even if it should not +# because its __goals.omk.inc is not included. +-include $(shell true; find $(OMK_WORK_DIR) -name '__goals.omk.inc') # `true' is a hack for MinGW + +# Definition of rules is included everywhere to allow multi-directory +# targets. +-include $(shell true; find $(BUILD_OMK_DIR) -name '*.omk.inc' -not -name '__goals.omk.inc') # `true' is a hack for MinGW + # FIXME: Disable automatic remake of included files $(foreach rule,$(prepared_rules),$(eval $(call build_rule,$(rule)))) diff --git a/snippets/include.omk b/snippets/include.omk index df6d775..b5ed490 100644 --- a/snippets/include.omk +++ b/snippets/include.omk @@ -35,3 +35,6 @@ prepare-pass:: cmp --quiet TODO_BUILD_DIR/$$$${srcfname} $(1)/$$$${destfname} \ || ( mkdir -p `dirname $(1)/$$$${destfname}` && $$(call cp_cmd,TODO_BUILD_DIR/$$$${srcfname},$(1)/$$$${destfname}) ) || exit 1 ; ) endef + +# TODO: *_GEN_HEADERS should be copied by normal rules during build +# phase because they are generated by another rule. -- 2.39.2