Changeset 552 for trunk/kBuild/footer.kmk
- Timestamp:
- Sep 24, 2006, 9:37:41 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/footer.kmk
r530 r552 117 117 # @param bld_trg build target. 118 118 # @param bld_trg_arch build target architecture. 119 # @remark Obsoleted by kBuild helpers in kmk. Only required for gmake compatbility. 119 120 _SOURCE_TOOL = $(strip $(firstword \ 120 121 $($(target)_$(source)_$(type)TOOL.$(bld_trg).$(bld_trg_arch)) \ … … 177 178 # 1. Source files in the output directory are translated into a gen/ subdir. 178 179 # 2. Catch anyone specifying $(PATH_SUB_CURRENT)/sourcefile.c. 180 # @remark obsoleted by kBuild helpers in kmk. Only required for gmake compatbility. 179 181 _OBJECT_BASE = $(PATH_TARGET)/$(2)/$(call no-root-slash,$(call no-drive,$(basename \ 180 182 $(patsubst $(PATH_ROOT)/%,%,$(patsubst $(PATH_SUB_CURRENT)/%,%,$(patsubst $(PATH_TARGET)/$(2)/%,gen/%,$(1))))))) … … 234 236 define def_template_extends_prop 235 237 ifndef TEMPLATE_$(template)_$(prop) 236 ifdef TEMPLATE_$(parent)_$(prop)238 ifdef TEMPLATE_$(parent)_$(prop) 237 239 TEMPLATE_$(template)_$(prop) = $$(TEMPLATE_$(parent)_$(prop)) 238 endif 239 endif 240 endef 240 endif 241 endif 242 endef 243 241 244 242 245 define def_template_extends 243 246 ifdef TEMPLATE_$(template)_EXTENDS 244 parent := $(strip $(TEMPLATE_$(template)_EXTENDS)) 245 246 $(foreach prop, $(PROPS_SINGLE) $(PROPS_ACCUMULATE) $(PROPS_DEFERRED)\ 247 $(addsuffix .$(BUILD_TARGET), $(PROPS_SINGLE) $(PROPS_ACCUMULATE) $(PROPS_DEFERRED))\ 248 $(addsuffix .$(BUILD_TARGET).$(BUILD_TARGET_ARCH), $(PROPS_SINGLE) $(PROPS_ACCUMULATE) $(PROPS_DEFERRED))\ 249 $(addsuffix .$(BUILD_TARGET_ARCH), $(PROPS_SINGLE) $(PROPS_ACCUMULATE) $(PROPS_DEFERRED))\ 250 $(addsuffix .$(BUILD_TARGET_CPU), $(PROPS_SINGLE) $(PROPS_ACCUMULATE) $(PROPS_DEFERRED))\ 251 $(addsuffix .$(BUILD_TYPE), $(PROPS_SINGLE) $(PROPS_ACCUMULATE) $(PROPS_DEFERRED))\ 252 ,$(eval $(def_template_extends_prop))) # exploits the 2 evaluation, so no value! 247 ifndef TEMPLATE_$(template)_EXTENDS_STATUS_ 248 TEMPLATE_$(template)_EXTENDS_STATUS_ := 0 249 parent := $(strip $(TEMPLATE_$(template)_EXTENDS)) 250 251 # recursivly process the parent if it's inherting from somebody too. 252 ifdef TEMPLATE_$(parent)_EXTENDS 253 ifneq ($(TEMPLATE_$(template)_EXTENDS_STATUS_),42) 254 # foreach will create 'template' in a new variable context hiding our current variable. 255 $(foreach template, $(TEMPLATE_$(parent)_EXTENDS), $(eval $(value def_template_extends))) 256 parent := $(strip $(TEMPLATE_$(template)_EXTENDS)) 257 endif 258 endif 259 260 # inherit properties. 261 $(foreach prop, $(PROPS_SINGLE) $(PROPS_ACCUMULATE) $(PROPS_DEFERRED)\ 262 $(addsuffix .$(BUILD_TARGET), $(PROPS_SINGLE) $(PROPS_ACCUMULATE) $(PROPS_DEFERRED))\ 263 $(addsuffix .$(BUILD_TARGET).$(BUILD_TARGET_ARCH), $(PROPS_SINGLE) $(PROPS_ACCUMULATE) $(PROPS_DEFERRED))\ 264 $(addsuffix .$(BUILD_TARGET_ARCH), $(PROPS_SINGLE) $(PROPS_ACCUMULATE) $(PROPS_DEFERRED))\ 265 $(addsuffix .$(BUILD_TARGET_CPU), $(PROPS_SINGLE) $(PROPS_ACCUMULATE) $(PROPS_DEFERRED))\ 266 $(addsuffix .$(BUILD_TYPE), $(PROPS_SINGLE) $(PROPS_ACCUMULATE) $(PROPS_DEFERRED))\ 267 ,$(eval $(def_template_extends_prop))) # exploits the 2 evaluation, so no value! 268 269 TEMPLATE_$(template)_EXTENDS_STATUS_ := 42 270 else 271 # protect against inheritance loops. 272 ifneq ($(TEMPLATE_$(template)_EXTENDS_STATUS_),42) 273 $(error kBuild: inheritance loop! template=$(template)) 274 endif 275 endif 253 276 endif 254 277 endef … … 495 518 ## wrapper the compile command dependency check. 496 519 ifndef NO_COMPILE_CMDS_DEPS 497 if def NEW_KMK520 ifneq ($(filter comp-vars,$(KMK_FEATURES)),) 498 521 _DEP_COMPILE_CMDS = $(comp-vars $(target)_$(source)_CMDS_PREV_,$(target)_$(source)_CMDS_,FORCE) 499 522 else … … 595 618 # @param bld_trg_arch Build target arch. 596 619 # @param bld_trg_cpu Build target cpu. 620 # @remark obsoleted by kBuild helpers in kmk. Only required for gmake compatbility. 597 621 # 598 622 define def_target_source_c_cpp_asm_old … … 868 892 $($(target)_$(source)_$(type)FLAGS.$(bld_trg).$(bld_trg_arch))\ 869 893 $($(target)_$(source)_$(type)FLAGS.$(bld_trg_cpu)) 894 # this isn't 100% in sync with kBuild, but it doesn't matter as it's only for gmake now. 870 895 objsuff := $(firstword \ 871 896 $($(target)_$(source)_OBJSUFF.$(bld_trg).$(bld_trg_arch))\ … … 966 991 def_target_source_c_cpp_asm_new = $(kb-src-one x) 967 992 968 if def NEW_KMK993 ifneq ($(filter kb-src-one,$(KMK_FEATURES)),) 969 994 def_target_source_c_cpp_asm_var = def_target_source_c_cpp_asm_new 970 995 else
Note:
See TracChangeset
for help on using the changeset viewer.