Changeset 660 for trunk/kBuild
- Timestamp:
- Dec 5, 2006, 3:36:19 PM (19 years ago)
- Location:
- trunk/kBuild
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/footer.kmk
r659 r660 271 271 272 272 # inherit properties. 273 $(foreach prop, $(PROPS_SINGLE) $(PROPS_ACCUMULATE ) $(PROPS_DEFERRED)\274 $(addsuffix .$(BUILD_TARGET), $(PROPS_SINGLE) $(PROPS_ACCUMULATE ) $(PROPS_DEFERRED))\275 $(addsuffix .$(BUILD_TARGET).$(BUILD_TARGET_ARCH), $(PROPS_SINGLE) $(PROPS_ACCUMULATE ) $(PROPS_DEFERRED))\276 $(addsuffix .$(BUILD_TARGET_ARCH), $(PROPS_SINGLE) $(PROPS_ACCUMULATE ) $(PROPS_DEFERRED))\277 $(addsuffix .$(BUILD_TARGET_CPU), $(PROPS_SINGLE) $(PROPS_ACCUMULATE ) $(PROPS_DEFERRED))\278 $(addsuffix .$(BUILD_TYPE), $(PROPS_SINGLE) $(PROPS_ACCUMULATE ) $(PROPS_DEFERRED))\273 $(foreach prop, $(PROPS_SINGLE) $(PROPS_ACCUMULATE_R) $(PROPS_ACCUMULATE_L) $(PROPS_DEFERRED)\ 274 $(addsuffix .$(BUILD_TARGET), $(PROPS_SINGLE) $(PROPS_ACCUMULATE_L) $(PROPS_ACCUMULATE_R) $(PROPS_DEFERRED))\ 275 $(addsuffix .$(BUILD_TARGET).$(BUILD_TARGET_ARCH), $(PROPS_SINGLE) $(PROPS_ACCUMULATE_L) $(PROPS_ACCUMULATE_R) $(PROPS_DEFERRED))\ 276 $(addsuffix .$(BUILD_TARGET_ARCH), $(PROPS_SINGLE) $(PROPS_ACCUMULATE_L) $(PROPS_ACCUMULATE_R) $(PROPS_DEFERRED))\ 277 $(addsuffix .$(BUILD_TARGET_CPU), $(PROPS_SINGLE) $(PROPS_ACCUMULATE_L) $(PROPS_ACCUMULATE_R) $(PROPS_DEFERRED))\ 278 $(addsuffix .$(BUILD_TYPE), $(PROPS_SINGLE) $(PROPS_ACCUMULATE_L) $(PROPS_ACCUMULATE_R) $(PROPS_DEFERRED))\ 279 279 ,$(eval $(def_template_extends_prop))) # exploits the 2 evaluation, so no value! 280 280 … … 372 372 endef 373 373 374 ## Inherit one template property.374 ## Inherit one acculumlative template property where the 'most significant' items are at the left end. 375 375 # @param $(prop) Property name 376 376 # @param $(target) Target name 377 define def_inherit_template_one_accumulate 377 define def_inherit_template_one_accumulate_l 378 378 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop) 379 379 #$ (warning dbgtype: TEMPLATE_$($(target)_TEMPLATE)_$(prop) $(target)_$(prop)=$($(target)_$(prop)) $(TEMPLATE_$($(target)_TEMPLATE)_$(prop))) … … 402 402 endif 403 403 endef 404 405 ## Inherit one acculumlative template property where the 'most significant' items are at the right end. 406 # First pass, $(value) referenced. 407 # @param $(prop) Property name 408 # @param $(target) Target name 409 define def_inherit_template_one_accumulate_r1 410 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop) 411 _$(target)_$(prop)_R := $(value $(target)_$(prop)) 412 endif 413 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TYPE) 414 _$(target)_$(prop).$(BUILD_TYPE)_R := $(value $(target)_$(prop).$(BUILD_TYPE)) 415 endif 416 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg) 417 _$(target)_$(prop).$(bld_trg)_R := $(value $(target)_$(prop).$(bld_trg)) 418 endif 419 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg).$(bld_trg_arch) 420 _$(target)_$(prop).$(bld_trg).$(bld_trg_arch)_R := $(value $(target)_$(prop).$(bld_trg).$(bld_trg_arch)) 421 endif 422 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_cpu) 423 _$(target)_$(prop).$(bld_trg_cpu)_R := $(value $(target)_$(prop).$(bld_trg_cpu)) 424 endif 425 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_arch) 426 _$(target)_$(prop).$(bld_trg_arch)_R := $(value $(target)_$(prop).$(bld_trg_arch)) 427 endif 428 endef 429 430 ## Inherit one template property the other way around. 431 # Second pass, not $(value) referenced. 432 # @param $(prop) Property name 433 # @param $(target) Target name 434 define def_inherit_template_one_accumulate_r2 435 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop) 436 $(target)_$(prop) = $$(TEMPLATE_$($(target)_TEMPLATE)_$(prop)) $$(_$(target)_$(prop)_R) 437 endif 438 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TYPE) 439 $(target)_$(prop).$(BUILD_TYPE) = $$(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TYPE)) $$(_$(target)_$(prop).$(BUILD_TYPE)_R) 440 endif 441 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg) 442 $(target)_$(prop).$(bld_trg) = $$(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg)) $$(_$(target)_$(prop).$(bld_trg)_R) 443 endif 444 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg).$(bld_trg_arch) 445 $(target)_$(prop).$(bld_trg).$(bld_trg_arch) = $$(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg).$(bld_trg_arch)) $$(_$(target)_$(prop).$(bld_trg).$(bld_trg_arch)_R) 446 endif 447 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_cpu) 448 $(target)_$(prop).$(bld_trg_cpu) = $$(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_cpu)) $$(_$(target)_$(prop).$(bld_trg_cpu)_R) 449 endif 450 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_arch) 451 $(target)_$(prop).$(bld_trg_arch) = $$(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_arch)) $$(_$(target)_$(prop).$(bld_trg_arch)_R) 452 endif 453 endef 454 404 455 405 456 ## Inherit template properties for on target. … … 416 467 $(foreach prop,$(PROPS_SINGLE),$(eval $(value def_inherit_template_one))) 417 468 $(foreach prop,$(PROPS_DEFERRED),$(eval $(def_inherit_template_one_deferred))) # exploits the 2 evaluation, so no value! 418 $(foreach prop,$(PROPS_ACCUMULATE),$(eval $(def_inherit_template_one_accumulate))) # += works fine (better) without value. 469 $(foreach prop,$(PROPS_ACCUMULATE_L),$(eval $(def_inherit_template_one_accumulate_l))) # += works fine (better) without value. 470 $(foreach prop,$(PROPS_ACCUMULATE_R),\ 471 $(eval $(value def_inherit_template_one_accumulate_r1))\ 472 $(eval $(def_inherit_template_one_accumulate_r2))\ 473 ) # This is a hack! (but it appears to work) 419 474 endif 420 475 endef … … 2350 2405 @$(ECHO) " TARGET_$(target)=$(TARGET_$(target))" $(NLTAB)\ 2351 2406 @$(ECHO) " INSTARGET_$(target)=$(INSTARGET_$(target))" $(NLTAB)\ 2352 $(foreach prop,$(PROPS_SINGLE) $(PROPS_ACCUMULATE ) OBJS_ CLEAN, \2407 $(foreach prop,$(PROPS_SINGLE) $(PROPS_ACCUMULATE_L) $(PROPS_ACCUMULATE_R) OBJS_ CLEAN, \ 2353 2408 $(eval _tmp:=$(firstword $($(target)_BLD_TRG) $(BUILD_TARGET))) \ 2354 2409 $(if $($(target)_$(prop).$(_tmp)),\ -
trunk/kBuild/header.kmk
r653 r660 524 524 PROPS_DEFERRED := INSTFUN INSTALLER 525 525 526 ## PROPS_ACCUMULATE 527 # The list of accumulative target properties. 526 ## PROPS_ACCUMULATE_R 527 # The list of accumulative target properties where the right most value/flag 528 # is the 'most significant'. 528 529 # A Config.kmk file can add it's own properties to this list and kBuild 529 530 # will do the necessary inheritance from templates to targets. 530 PROPS_ACCUMULATE := \ 531 SDKS DEFS DEPS INCS SOURCES \ 532 COPTS CFLAGS CDEFS CINCS CXXOPTS CXXFLAGS CXXDEFS CXXINCS \ 533 ASOPTS ASFLAGS ASDEFS ASINCS \ 534 RCOPTS RCFLAGS RCDEFS RCINCS \ 535 LDFLAGS LIBS LIBPATH \ 531 PROPS_ACCUMULATE_R := \ 532 DEFS DEPS \ 533 CFLAGS CDEFS \ 534 CXXFLAGS CXXDEFS \ 535 ASFLAGS ASDEFS \ 536 RCFLAGS RCDEFS \ 537 LDFLAGS \ 536 538 FETCHFLAGS UNPACKFLAGS PATCHFLAGS 539 540 ## PROPS_ACCUMULATE 541 # The list of accumulative target properties where the left most value/flag 542 # is the 'most significant'. 543 # A Config.kmk file can add it's own properties to this list and kBuild 544 # will do the necessary inheritance from templates to targets. 545 PROPS_ACCUMULATE_L := \ 546 SDKS SOURCES \ 547 INCS CINCS CXXINCX ASINCS RCINCS \ 548 LIBS LIBPATH 537 549 538 550
Note:
See TracChangeset
for help on using the changeset viewer.