Changeset 105 for trunk/kBuild


Ignore:
Timestamp:
Jun 24, 2004, 10:05:26 PM (21 years ago)
Author:
bird
Message:

Fixed some inheritance issues.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/footer.kmk

    r98 r105  
    6868# @param    $3      tooltype
    6969_SOURCE_TOOL = $(strip $(firstword \
    70         $($1_$2_$(3)TOOL.$(BUILD_TARGET))       $($1_$2_TOOL.$(BUILD_TARGET)) \
    71         $($1_$2_$(3)TOOL) $($1_$2_TOOL) \
    72         $($1_$(3)TOOL.$(BUILD_TARGET)) $($1_TOOL.$(BUILD_TARGET)) \
    73         $($1_$(3)TOOL) $($1_TOOL) \
    74         $($2_$(3)TOOL.$(BUILD_TARGET)) $($2_TOOL.$(BUILD_TARGET)) \
    75         $($2_$(3)TOOL) $($2_TOOL) \
     70        $($(1)_$(2)_$(3)TOOL.$(BUILD_TARGET)) $($(1)_$(2)_TOOL.$(BUILD_TARGET)) \
     71        $($(1)_$(2)_$(3)TOOL) $($1_$2_TOOL) \
     72        $($(1)_$(3)TOOL.$(BUILD_TARGET)) $($(1)_TOOL.$(BUILD_TARGET)) \
     73        $($(1)_$(3)TOOL) $($1_TOOL) \
     74        $($(2)_$(3)TOOL.$(BUILD_TARGET)) $($(2)_TOOL.$(BUILD_TARGET)) \
     75        $($(2)_$(3)TOOL) $($(2)_TOOL) \
    7676        $($(3)TOOL.$(BUILD_TARGET)) $(TOOL.$(BUILD_TARGET)) \
    7777        $($(3)TOOL) $(TOOL) ))
     
    129129ifndef $(target)_$(prop)
    130130ifdef $(prop)
    131 $(target)_$(prop) := $($(prop))
     131$$(eval $(target)_$(prop) := $($(prop)))
    132132endif
    133133endif
     
    142142ifdef $(target)_TEMPLATE
    143143ifndef TEMPLATE_$($(target)_TEMPLATE)_TOOL
    144 $(foreach prop,TOOL, $(eval $(def_inherit_defaults_one)))
     144$$(foreach prop,TOOL, $$(eval $$(def_inherit_defaults_one)))
    145145endif
    146146ifndef TEMPLATE_$($(target)_TEMPLATE)_SDKS
    147 $(foreach prop,SDKS, $(eval $(def_inherit_defaults_one)))
     147$$(foreach prop,SDKS, $$(eval $$(def_inherit_defaults_one)))
    148148endif
    149149else
    150 $(foreach prop,TEMPLATE TOOL SDKS,$(eval $(def_inherit_defaults_one)))
     150$$(foreach prop,TEMPLATE TOOL SDKS, $$(eval $$(def_inherit_defaults_one)))
    151151endif
    152152endef
    153153# Inherit default properties.
    154 $(foreach target, $(ALL_TARGETS), $(eval $(def_inherit_defaults)))
     154$(foreach target, $(ALL_TARGETS),$(eval $(def_inherit_defaults)))
    155155
    156156
     
    162162ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop)
    163163ifndef $(target)_$(prop)
    164 $(eval $(target)_$(prop) := $(TEMPLATE_$($(target)_TEMPLATE)_$(prop)))
     164#$$ (warning dbg1: $(target)_$(prop):='$(TEMPLATE_$($(target)_TEMPLATE)_$(prop))' TEMPLATE_$($(target)_TEMPLATE)_$(prop))
     165$$(target)_$$(prop) := $$(TEMPLATE_$$($$(target)_TEMPLATE)_$$(prop))
    165166endif
    166167endif
    167168ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TARGET)
    168169ifndef $(target)_$(prop).$(BUILD_TARGET)
    169 $(eval $(target)_$(prop).$(BUILD_TARGET) := $(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TARGET)))
     170#$$ (warning dbg2: $(target)_$(prop).$(BUILD_TARGET)="TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TARGET)" TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TARGET))
     171$$(target)_$$(prop).$$(BUILD_TARGET) := $$(TEMPLATE_$$($$(target)_TEMPLATE)_$$(prop).$$(BUILD_TARGET))
    170172endif
    171173endif
     
    177179define def_inherit_template_one_accumulate
    178180ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop)
    179 $(eval $(target)_$(prop) := $($(target)_$(prop)) $(TEMPLATE_$($(target)_TEMPLATE)_$(prop)))
     181#$$ (warning dbg3: TEMPLATE_$($(target)_TEMPLATE)_$(prop) $(target)_$(prop)=$($(target)_$(prop)) $(TEMPLATE_$($(target)_TEMPLATE)_$(prop)))
     182$$(eval $(target)_$(prop) := $($(target)_$(prop)) $(TEMPLATE_$($(target)_TEMPLATE)_$(prop)))
     183#$$ (warning dbg3: $(target)_$(prop)=$($(target)_$(prop)))
    180184endif
    181185ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TARGET)
    182 $(eval $(target)_$(prop).$(BUILD_TARGET) := $($(target)_$(prop).$(BUILD_TARGET)) $(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TARGET)))
     186#$$ (warning dbg4: TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TARGET))
     187$$(eval $(target)_$(prop).$(BUILD_TARGET) := $($(target)_$(prop).$(BUILD_TARGET)) $(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TARGET)))
    183188endif
    184189ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TARGET_CPU)
    185 $(eval $(target)_$(prop).$(BUILD_TARGET_CPU) := $($(target)_$(prop).$(BUILD_TARGET)) $(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TARGET_CPU)))
     190#$$ (warning dbg5: TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TARGET_CPU))
     191$$(eval $(target)_$(prop).$(BUILD_TARGET_CPU) := $($(target)_$(prop).$(BUILD_TARGET)) $(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TARGET_CPU)))
    186192endif
    187193ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TARGET_ARCH)
    188 $(eval $(target)_$(prop).$(BUILD_TARGET_ARCH) := $($(target)_$(prop).$(BUILD_TARGET)) $(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TARGET_ARCH)))
     194#$$ (warning dbg6: TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TARGET_ARCH))
     195$$(eval $(target)_$(prop).$(BUILD_TARGET_ARCH) := $($(target)_$(prop).$(BUILD_TARGET)) $(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TARGET_ARCH)))
    189196endif
    190197endef
     
    193200# @param    $(target)    Target name.
    194201define def_inherit_template
    195 $(foreach prop, TOOL ARTOOL CTOOL CXXTOOL ASTOOL LDTOOL\
    196         ,$(eval $(def_inherit_template_one)))
    197 $(foreach prop,SDKS DEFS INCS COPTS CFLAGS CDEFS CINCS CXXOPTS CXXFLAGS CXXDEFS CXXINCS ASOPTS ASFLAGS ASDEFS ASINCS LDFLAGS LIBS LIBPATH \
    198         ,$(eval $(def_inherit_template_one_accumulate)))
     202$$(foreach prop, TOOL ARTOOL CTOOL CXXTOOL ASTOOL LDTOOL\
     203        ,$$(eval $$(def_inherit_template_one)))
     204$$(foreach prop,SDKS DEFS INCS COPTS CFLAGS CDEFS CINCS CXXOPTS CXXFLAGS CXXDEFS CXXINCS ASOPTS ASFLAGS ASDEFS ASINCS LDFLAGS LIBS LIBPATH \
     205        ,$$(eval $$(def_inherit_template_one_accumulate)))
    199206endef
    200207# Inherit template properties
    201 $(foreach target, $(ALL_TARGETS), $(eval $(def_inherit_template)))
    202 
     208$(foreach target, $(ALL_TARGETS),$(eval $(def_inherit_template)))
    203209
    204210
     
    283289#
    284290# @remark   I've no clue why I've to $(eval ..) everything in this define. MAKE bug?
     291# @remark       I now have a clue. Have to use $$ if not.
    285292define def_target_source_c_cpp_asm
    286 #$ (warning dbg: def_target_source_c_cpp_asm: source=$(source) target=$(target) type=$(type))
     293#$ (warning dbg: def_target_source_c_cpp_asm: source='$(source)' target='$(target)' type='$(type)')
    287294
    288295$(eval tool:=$(call _SOURCE_TOOL,$(source),$(target),$(type)))
Note: See TracChangeset for help on using the changeset viewer.