Changeset 981


Ignore:
Timestamp:
May 27, 2007, 10:22:05 PM (18 years ago)
Author:
bird
Message:

Use the new prepend operator <= instead of the slow and clumsy _r1/r2 template inheritance stuff.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/footer.kmk

    r979 r981  
    343343
    344344## Inherit one acculumlative template property where the 'most significant' items are at the right end.
    345 # First pass, $(value) referenced.
    346345# @param    $(prop)     Property name
    347346# @param    $(target)   Target name
    348 define def_inherit_template_one_accumulate_r1
     347define def_inherit_template_one_accumulate_r
    349348ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop)
    350 $(eval _$(target)_$(prop)_R = $(value $(target)_$(prop)))
     349#$ (warning dbgtype: TEMPLATE_$($(target)_TEMPLATE)_$(prop) $(target)_$(prop)=$($(target)_$(prop)) $(TEMPLATE_$($(target)_TEMPLATE)_$(prop)))
     350$(target)_$(prop) <=$$(TEMPLATE_$($(target)_TEMPLATE)_$(prop))
     351#$ (warning dbgtype: $(target)_$(prop)=$($(target)_$(prop)))
    351352endif
    352353ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TYPE)
    353 $(eval _$(target)_$(prop).$(BUILD_TYPE)_R = $(value $(target)_$(prop).$(BUILD_TYPE)))
     354#$ (warning dbg4: TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TYPE))
     355$(target)_$(prop).$(BUILD_TYPE) <=$$(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TYPE))
    354356endif
    355357ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg)
    356 $(eval _$(target)_$(prop).$(bld_trg)_R = $(value $(target)_$(prop).$(bld_trg)))
     358#$ (warning dbg5: TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg))
     359$(target)_$(prop).$(bld_trg) <=$$(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg))
    357360endif
    358361ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg).$(bld_trg_arch)
    359 $(eval _$(target)_$(prop).$(bld_trg).$(bld_trg_arch)_R = $(value $(target)_$(prop).$(bld_trg).$(bld_trg_arch)))
     362#$ (warning dbg4: TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg).$(bld_trg_arch))
     363$(target)_$(prop).$(bld_trg).$(bld_trg_arch) <=$$(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg).$(bld_trg_arch))
    360364endif
    361365ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_cpu)
    362 $(eval _$(target)_$(prop).$(bld_trg_cpu)_R = $(value $(target)_$(prop).$(bld_trg_cpu)))
     366#$ (warning dbg5: TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_cpu))
     367$(target)_$(prop).$(bld_trg_cpu) <=$$(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_cpu))
    363368endif
    364369ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_arch)
    365 $(eval _$(target)_$(prop).$(bld_trg_arch)_R = $(value $(target)_$(prop).$(bld_trg_arch)))
    366 endif
    367 endef
    368 
    369 ## Inherit one template property the other way around.
    370 # Second pass, not $(value) referenced.
    371 # @param    $(prop)     Property name
    372 # @param    $(target)   Target name
    373 define def_inherit_template_one_accumulate_r2
    374 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop)
    375 $(target)_$(prop) = $$(TEMPLATE_$($(target)_TEMPLATE)_$(prop)) $$(_$(target)_$(prop)_R)
    376 endif
    377 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TYPE)
    378 $(target)_$(prop).$(BUILD_TYPE) = $$(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TYPE)) $$(_$(target)_$(prop).$(BUILD_TYPE)_R)
    379 endif
    380 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg)
    381 $(target)_$(prop).$(bld_trg) = $$(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg)) $$(_$(target)_$(prop).$(bld_trg)_R)
    382 endif
    383 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg).$(bld_trg_arch)
    384 $(target)_$(prop).$(bld_trg).$(bld_trg_arch) = $$(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg).$(bld_trg_arch)) $$(_$(target)_$(prop).$(bld_trg).$(bld_trg_arch)_R)
    385 endif
    386 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_cpu)
    387 $(target)_$(prop).$(bld_trg_cpu) = $$(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_cpu)) $$(_$(target)_$(prop).$(bld_trg_cpu)_R)
    388 endif
    389 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_arch)
    390 $(target)_$(prop).$(bld_trg_arch) = $$(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_arch)) $$(_$(target)_$(prop).$(bld_trg_arch)_R)
     370#$ (warning dbg6: TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_arch))
     371$(target)_$(prop).$(bld_trg_arch) <=$$(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_arch))
    391372endif
    392373endef
     
    412393$(foreach prop,$(PROPS_SINGLE),$(eval $(value def_inherit_template_one)))
    413394$(foreach prop,$(PROPS_DEFERRED),$(eval $(def_inherit_template_one_deferred))) # exploits the 2 evaluation, so no value!
    414 $(foreach prop,$(PROPS_ACCUMULATE_L),$(eval $(def_inherit_template_one_accumulate_l))) # += works fine (better) without value.
    415 $(foreach prop,$(PROPS_ACCUMULATE_R),\
    416 $(eval $(value def_inherit_template_one_accumulate_r1))\
    417 $(eval $(def_inherit_template_one_accumulate_r2))\
    418 ) # This is a hack! (but it appears to work)
     395$(foreach prop,$(PROPS_ACCUMULATE_L),$(eval $(def_inherit_template_one_accumulate_l))) # += works fine without value
     396$(foreach prop,$(PROPS_ACCUMULATE_R),$(eval $(def_inherit_template_one_accumulate_r))) # use <= (kmk addition)
    419397endif
    420398endef
Note: See TracChangeset for help on using the changeset viewer.