Changeset 2434 for trunk/kBuild


Ignore:
Timestamp:
Jan 9, 2011, 6:45:08 PM (15 years ago)
Author:
bird
Message:

kBuild: Deprecating PATH_<target> and <target>_PATH in favor of <target>_0_OUTDIR and <target>_DEFPATH.

Location:
trunk/kBuild
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/footer.kmk

    r2433 r2434  
    158158        $(TOOL.$(bld_trg)) \
    159159        $(TOOL) \
     160))
    160161else
    161162_TARGET_TOOL = $(strip $(firstword \
     
    188189        $(TOOL.$(bld_type)) \
    189190        $(TOOL) \
    190         ))
     191))
    191192endif
    192193
     
    22182219        $(SUFF_LIB))
    22192220local out         := $(outbase)$(suff)
    2220 local defpath     := $(firstword $($(target)_PATH) $($(target)_DEFPATH))
     2221local defpath     := $($(target)_DEFPATH)
     2222ifeq ($(defpath),)
     2223 local defpath    := $($(target)_PATH)
     2224endif
    22212225TARGET_$(target)  := $(out)
    22222226$(target)_1_TARGET:= $(out)
     
    24742478TARGET_$(target)  := $(out)
    24752479$(target)_1_TARGET:= $(out)
    2476 local defpath     := $(firstword $($(target)_PATH) $($(target)_DEFPATH))
     2480local defpath     := $($(target)_DEFPATH)
     2481ifeq ($(defpath),)
     2482 local defpath    := $($(target)_PATH)
     2483endif
    24772484# no local here - must be writable across some foreachs.
    24782485othersrc          :=
     
    31273134
    31283135# Adjust the source if we got a default PATH. (This must be done this late!)
    3129 local defpath := $(firstword $($(target)_PATH) $($(target)_DEFPATH))
     3136local defpath     := $($(target)_DEFPATH)
     3137ifeq ($(defpath),)
     3138 local defpath    := $($(target)_PATH)
     3139endif
    31303140ifneq ($(defpath),)
    31313141 local srcsrc := $(abspathex $(srcsrc),$(defpath))
  • trunk/kBuild/header.kmk

    r2413 r2434  
    764764endef
    765765
     766##
     767# Make an assignment to a deprecated variable.
     768#
     769# @param   $1   The variable name.
     770# @param   $2   The value.
     771# @param   $3   The variable to use instead.
     772#
     773ifdef KBUILD_WITH_DEPREATED_AS_ERROR
     774 KB_FN_ASSIGN_DEPRECATED = $(eval $1 = $2$$(error $1 is deprecated, use $3 instead))
     775else
     776 KB_FN_ASSIGN_DEPRECATED = $(eval $1 = $2$$(warning $1 is deprecated, use $3 instead))
     777endif
    766778
    767779
  • trunk/kBuild/subfooter.kmk

    r2413 r2434  
    4444define def_subheader
    4545 ifndef $(target)_PATH
    46   ifdef $(target)_DEFPATH
    47    $(target)_PATH := $($(target)_DEFPATH)
    48   else
    49    $(target)_PATH := $(PATH_SUB_CURRENT)
     46  ifndef $(target)_DEFPATH
    5047   $(target)_DEFPATH := $(PATH_SUB_CURRENT)
    5148  endif
     49  $(call KB_FN_ASSIGN_DEPRECATED,$(target)_PATH,$($(target)_DEFPATH), $(target)_DEFPATH)
    5250 else ifndef $(target)_DEFPATH
    5351  $(target)_DEFPATH := $($(target)_PATH)
     
    5856 ifndef $(target)_0_OUTDIR
    5957  $(target)_0_OUTDIR := $(call TARGET_PATH,$(target))
    60   PATH_$(target) := $($(target)_0_OUTDIR)
     58  $(call KB_FN_ASSIGN_DEPRECATED,PATH_$(target),$($(target)_0_OUTDIR), $(target)_0_OUTDIR)
    6159 endif
    6260endef
  • trunk/kBuild/subheader.kmk

    r2413 r2434  
    5555 define def_subfooter
    5656  ifndef $(target)_PATH
    57    ifdef $(target)_DEFPATH
    58     $(target)_PATH := $($(target)_DEFPATH)
    59    else
    60     $(target)_PATH := $(PATH_SUB_CURRENT)
     57   ifndef $(target)_DEFPATH
    6158    $(target)_DEFPATH := $(PATH_SUB_CURRENT)
    6259   endif
     60   $(call KB_FN_ASSIGN_DEPRECATED,$(target)_PATH,$($(target)_DEFPATH), $(target)_DEFPATH)
    6361  else ifndef $(target)_DEFPATH
    6462   $(target)_DEFPATH := $($(target)_PATH)
     
    6967  ifndef $(target)_0_OUTDIR
    7068   $(target)_0_OUTDIR := $(call TARGET_PATH,$(target))
    71    PATH_$(target) := $($(target)_0_OUTDIR)
     69   $(call KB_FN_ASSIGN_DEPRECATED,PATH_$(target),$($(target)_0_OUTDIR), $(target)_0_OUTDIR)
    7270  endif
    7371 endef
Note: See TracChangeset for help on using the changeset viewer.