Ignore:
Timestamp:
Aug 1, 2011, 1:45:20 AM (14 years ago)
Author:
bird
Message:

kBuild: debug info installation support, core hacking + mac os x.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/footer-pass1.kmk

    r2521 r2523  
    8585# Staging and install directory target variables.
    8686local insttype := $(firstword \
    87         $($(target)_INSTTYPE) \
    88         $($(target)_INSTTYPE.$(bld_trg)) \
     87        $($(target)_INSTTYPE.$(bld_trg).$(bld_trg_arch).$(bld_type)) \
    8988        $($(target)_INSTTYPE.$(bld_trg).$(bld_trg_arch)) \
    90         $($(target)_INSTTYPE.$(bld_trg).$(bld_trg_arch).$(bld_type)) \
     89        $($(target)_INSTTYPE.$(bld_trg).$(bld_type)) \
    9190        $($(target)_INSTTYPE.$(bld_trg_arch)) \
    9291        $($(target)_INSTTYPE.$(bld_trg_cpu)) \
     92        $($(target)_INSTTYPE.$(bld_trg)) \
    9393        $($(target)_INSTTYPE.$(bld_type)) \
     94        $($(target)_INSTTYPE) \
    9495        )
    9596ifeq ($(insttype),)
     
    113114
    114115if1of ($(insttype), stage both)
     116 local inst := $(strip $(firstdefined \
     117        $(target)_INST.$(bld_trg).$(bld_trg_arch).$(bld_type) \
     118        $(target)_INST.$(bld_trg).$(bld_trg_arch) \
     119        $(target)_INST.$(bld_trg).$(bld_type) \
     120        $(target)_INST.$(bld_trg_arch) \
     121        $(target)_INST.$(bld_trg_cpu) \
     122        $(target)_INST.$(bld_trg) \
     123        $(target)_INST.$(bld_type) \
     124        $(target)_INST \
     125        definst \
     126        ,value))
    115127 local stage := $(strip $(firstdefined \
    116128        $(target)_STAGE.$(bld_trg).$(bld_trg_arch).$(bld_type) \
    117         $(target)_INST.$(bld_trg).$(bld_trg_arch).$(bld_type) \
    118129        $(target)_STAGE.$(bld_trg).$(bld_trg_arch) \
    119         $(target)_INST.$(bld_trg).$(bld_trg_arch) \
    120130        $(target)_STAGE.$(bld_trg).$(bld_type) \
    121         $(target)_INST.$(bld_trg).$(bld_type) \
    122131        $(target)_STAGE.$(bld_trg_arch) \
    123         $(target)_INST.$(bld_trg_arch) \
     132        $(target)_STAGE.$(bld_trg_cpu) \
    124133        $(target)_STAGE.$(bld_trg) \
    125         $(target)_INST.$(bld_trg) \
    126134        $(target)_STAGE.$(bld_type) \
    127         $(target)_INST.$(bld_type) \
    128135        $(target)_STAGE \
    129         $(target)_INST \
    130         definst \
     136        inst \
    131137        ,value))
    132138 $(target)_1_STAGE := $(stage)
     
    145151
    146152if1of ($(insttype), both)
    147  local inst := $(strip $(firstdefined \
    148         $(target)_INST.$(bld_trg).$(bld_trg_arch).$(bld_type) \
    149         $(target)_INST.$(bld_trg).$(bld_trg_arch) \
    150         $(target)_INST.$(bld_trg).$(bld_type) \
    151         $(target)_INST.$(bld_trg_arch) \
    152         $(target)_INST.$(bld_trg) \
    153         $(target)_INST.$(bld_type) \
    154         $(target)_INST \
    155         definst \
    156         ,value))
    157153 $(target)_1_INST := $(inst)
    158154 if "$(substr $(inst),-1,1)" == "/" # Multicast support requires addprefix/suffix.
     
    167163 $(target)_1_INST_TARGET :=
    168164endif
     165
     166# Debug info related stuff.
     167local debug_insttype := $(firstword \
     168        $($(target)_DEBUG_INSTTYPE.$(bld_trg).$(bld_trg_arch).$(bld_type)) \
     169        $($(target)_DEBUG_INSTTYPE.$(bld_trg).$(bld_trg_arch)) \
     170        $($(target)_DEBUG_INSTTYPE.$(bld_trg).$(bld_type)) \
     171        $($(target)_DEBUG_INSTTYPE.$(bld_trg_arch)) \
     172        $($(target)_DEBUG_INSTTYPE.$(bld_trg_cpu)) \
     173        $($(target)_DEBUG_INSTTYPE.$(bld_trg)) \
     174        $($(target)_DEBUG_INSTTYPE.$(bld_type)) \
     175        $($(target)_DEBUG_INSTTYPE) \
     176        $(insttype) )
     177ifn1of ($(debug_insttype), none both stage)
     178 $(error kBuild: Unknown value '$(debug_insttype)' for '$(target)_DEBUG_INSTTYPE'. Valid values are 'none', 'both' and 'stage'.)
     179endif
     180$(target)_1_DEBUG_INSTTYPE := $(debug_insttype)
     181
     182if1of ($(debug_insttype), stage both)
     183 ifn1of ($(insttype), stage both)
     184  $(error kBuild: DEBUG_INSTTYPE=$(debug_insttype) and INSTTYPE=$(insttype) for target '$(target)' are not compatible)
     185 endif
     186 local debug_stage := $(firstdefined \
     187        $(target)_DEBUG_STAGE.$(bld_trg).$(bld_trg_arch).$(bld_type) \
     188        $(target)_DEBUG_STAGE.$(bld_trg).$(bld_trg_arch) \
     189        $(target)_DEBUG_STAGE.$(bld_trg).$(bld_type) \
     190        $(target)_DEBUG_STAGE.$(bld_trg_arch) \
     191        $(target)_DEBUG_STAGE.$(bld_trg_cpu) \
     192        $(target)_DEBUG_STAGE.$(bld_trg) \
     193        $(target)_DEBUG_STAGE.$(bld_type) \
     194        $(target)_DEBUG_STAGE \
     195        $(target)_DEBUG_INST.$(bld_trg).$(bld_trg_arch).$(bld_type) \
     196        $(target)_DEBUG_INST.$(bld_trg).$(bld_trg_arch) \
     197        $(target)_DEBUG_INST.$(bld_trg).$(bld_type) \
     198        $(target)_DEBUG_INST.$(bld_trg_arch) \
     199        $(target)_DEBUG_INST.$(bld_trg_cpu) \
     200        $(target)_DEBUG_INST.$(bld_trg) \
     201        $(target)_DEBUG_INST.$(bld_type) \
     202        $(target)_DEBUG_INST)
     203 ifneq ($(debug_stage),)
     204  $(target)_1_DEBUG_STAGE := $($(debug_stage))
     205 else
     206  $(target)_1_DEBUG_STAGE := $(addprefix $(STAGE_DEBUG),$(stage))
     207 endif
     208 ifndef $(target)_1_DEBUG_STAGE
     209  $(target)_1_DEBUG_STAGE := ./
     210 endif
     211else
     212 $(target)_1_DEBUG_STAGE :=
     213endif
     214
     215if1of ($(debug_insttype), both)
     216 ifn1of ($(insttype), both)
     217  $(error kBuild: DEBUG_INSTTYPE=$(debug_insttype) and INSTTYPE=$(insttype) for target '$(target)' are not compatible)
     218 endif
     219 local debug_inst := $(firstdefined \
     220        $(target)_DEBUG_INST.$(bld_trg).$(bld_trg_arch).$(bld_type) \
     221        $(target)_DEBUG_INST.$(bld_trg).$(bld_trg_arch) \
     222        $(target)_DEBUG_INST.$(bld_trg).$(bld_type) \
     223        $(target)_DEBUG_INST.$(bld_trg_arch) \
     224        $(target)_DEBUG_INST.$(bld_trg_cpu) \
     225        $(target)_DEBUG_INST.$(bld_trg) \
     226        $(target)_DEBUG_INST.$(bld_type) \
     227        $(target)_DEBUG_INST)
     228 ifneq ($(debug_inst),)
     229  $(target)_1_DEBUG_INST := $($(debug_inst))
     230 else
     231  $(target)_1_DEBUG_INST := $(addprefix $(INST_DEBUG),$(inst))
     232 endif
     233 ifndef $(target)_1_DEBUG_INST
     234  $(target)_1_DEBUG_INST := ./
     235 endif
     236else
     237 $(target)_1_DEBUG_INST :=
     238endif
     239#$(warning $(NLTAB)$(target)_1_DEBUG_INST=$($(target)_1_DEBUG_INST)$(NLTAB)$(target)_1_DEBUG_STAGE=$($(target)_1_DEBUG_STAGE)$(NLTAB)insttype=$(insttype)$(NLTAB)debug_insttype=$(debug_insttype))
    169240
    170241endef # def_pass1_link_common
     
    292363# Determine and set 1_INSTTYPE.
    293364local insttype := $(firstword \
    294         $($(target)_INSTTYPE) \
    295         $($(target)_INSTTYPE.$(bld_trg)) \
     365        $($(target)_INSTTYPE.$(bld_trg).$(bld_trg_arch).$(bld_type)) \
    296366        $($(target)_INSTTYPE.$(bld_trg).$(bld_trg_arch)) \
    297         $($(target)_INSTTYPE.$(bld_trg).$(bld_trg_arch).$(bld_type)) \
     367        $($(target)_INSTTYPE.$(bld_trg).$(bld_type)) \
    298368        $($(target)_INSTTYPE.$(bld_trg_arch)) \
    299369        $($(target)_INSTTYPE.$(bld_trg_cpu)) \
     370        $($(target)_INSTTYPE.$(bld_trg)) \
    300371        $($(target)_INSTTYPE.$(bld_type)) \
     372        $($(target)_INSTTYPE) \
    301373        )
    302374ifeq ($(insttype),)
     
    323395 local stage := $(strip $(firstdefined \
    324396        $(target)_STAGE.$(bld_trg).$(bld_trg_arch).$(bld_type) \
     397        $(target)_STAGE.$(bld_trg).$(bld_trg_arch) \
     398        $(target)_STAGE.$(bld_trg).$(bld_type) \
     399        $(target)_STAGE.$(bld_trg_arch) \
     400        $(target)_STAGE.$(bld_trg_cpu) \
     401        $(target)_STAGE.$(bld_trg) \
     402        $(target)_STAGE.$(bld_type) \
     403        $(target)_STAGE \
    325404        $(target)_INST.$(bld_trg).$(bld_trg_arch).$(bld_type) \
    326         $(target)_STAGE.$(bld_trg).$(bld_trg_arch) \
    327405        $(target)_INST.$(bld_trg).$(bld_trg_arch) \
    328         $(target)_STAGE.$(bld_trg).$(bld_type) \
    329406        $(target)_INST.$(bld_trg).$(bld_type) \
    330         $(target)_STAGE.$(bld_trg_arch) \
    331407        $(target)_INST.$(bld_trg_arch) \
    332         $(target)_STAGE.$(bld_trg) \
     408        $(target)_INST.$(bld_trg_cpu) \
    333409        $(target)_INST.$(bld_trg) \
    334         $(target)_STAGE.$(bld_type) \
    335410        $(target)_INST.$(bld_type) \
    336         $(target)_STAGE \
    337411        $(target)_INST \
    338412        definst \
     
    353427        $(target)_INST.$(bld_trg).$(bld_type) \
    354428        $(target)_INST.$(bld_trg_arch) \
     429        $(target)_INST.$(bld_trg_cpu) \
    355430        $(target)_INST.$(bld_trg) \
    356431        $(target)_INST.$(bld_type) \
Note: See TracChangeset for help on using the changeset viewer.