Changeset 3030 in kBuild
- Timestamp:
- Apr 20, 2017 7:05:15 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/header.kmk
r2971 r3030 944 944 KB_FN_ASSERT_ABSPATH := 945 945 endif 946 947 948 # 949 # Somewhat simple solution for automatic command dependencies. 950 # 951 952 ## 953 # Advanced version of KB_FN_AUTO_CMD_DEPS_COMMANDS_EX where you set 954 # the dependency file name yourself. 955 # 956 # After or before the recipe do $(call KB_FN_AUTO_CMD_DEPS_EX,<recipe-target>,<dep-file>). 957 # 958 # @param 1 dep file. 959 define KB_FN_AUTO_CMD_DEPS_COMMANDS_EX 960 %$(QUIET2)$(RM) -f -- "$1" 961 %$(QUIET2)$(APPEND) "$1" 'define AUTO_CMD_DEP_$(translate $@,:,_)_PREV_CMDS' 962 %$(QUIET2)$(APPEND) -c "$1" '$@' 963 %$(QUIET2)$(APPEND) "$1" 'endef' 964 endef 965 966 ## 967 # Advanced version of KB_FN_AUTO_CMD_DEPS 968 # 969 # @param 1 recipe name 970 # @param 2 dep file. 971 KB_FN_AUTO_CMD_DEPS_EX = $(eval includedep $2)$(eval _DEPFILES_INCLUDED += $2)$1: .MUST_MAKE = $$(comp-cmds-ex $$(AUTO_CMD_DEP_$(translate $1,:,_)_PREV_CMDS),$$(commands $1),FORCE) 972 973 ## 974 # $(call KB_FN_AUTO_CMD_DEPS_COMMANDS) as the first command in a recipe to 975 # automatically generate command dependencies. 976 # After or before the recipe do $(call KB_FN_AUTO_CMD_DEPS,<recipe-target>). 977 define KB_FN_AUTO_CMD_DEPS_COMMANDS 978 %$(QUIET2)$(RM) -f -- "[email protected]" 979 %$(QUIET2)$(APPEND) "[email protected]" 'define AUTO_CMD_DEP_$(translate $@,:,_)_PREV_CMDS' 980 %$(QUIET2)$(APPEND) -c "[email protected]" '$@' 981 %$(QUIET2)$(APPEND) "[email protected]" 'endef' 982 endef 983 984 ## 985 # Call before or after defining a recipe that you want automatic command 986 # dependencies on. The recipe must start off by $(call KB_FN_AUTO_CMD_DEPS_COMMANDS). 987 # 988 # @param 1 recipe name 989 KB_FN_AUTO_CMD_DEPS = $(call KB_FN_AUTO_CMD_DEPS_EX,$1,$1.auto-dep) 946 990 947 991
Note:
See TracChangeset
for help on using the changeset viewer.