VirtualBox

Changeset 3607 in kBuild for trunk


Ignore:
Timestamp:
Sep 9, 2024 2:50:55 PM (7 months ago)
Author:
bird
Message:

header.kmk: Move KB_FN_DO_PASS0_ON_TARGET up so we can use it from the Config.kmk files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/header.kmk

    r3579 r3607  
    858858# @param    $1      normalized main target
    859859TARGET_PATH = $(PATH_TARGET)/$(1)
     860
     861##
     862# An internal define used by subheader.kmk, subfooter.kmk, and
     863# KB_FN_DO_PASS0_ON_TARGET.
     864#
     865# @param target    The target to process.
     866#
     867define def_subfooter_header_target_pass
     868 ifndef $(target)_PATH
     869  ifndef $(target)_DEFPATH
     870   $(target)_DEFPATH := $(PATH_SUB_CURRENT)
     871  endif
     872  $(call KB_FN_ASSIGN_DEPRECATED,$(target)_PATH,$($(target)_DEFPATH), $(target)_DEFPATH)
     873 else ifndef $(target)_DEFPATH
     874  $(target)_DEFPATH := $($(target)_PATH)
     875 endif
     876 ifndef $(target)_MAKEFILE
     877  $(target)_MAKEFILE := $(MAKEFILE_CURRENT)
     878 endif
     879 ifndef $(target)_0_OUTDIR
     880  $(target)_0_OUTDIR := $(call TARGET_PATH,$(target))
     881  $(call KB_FN_ASSIGN_DEPRECATED,PATH_$(target),$($(target)_0_OUTDIR), $(target)_0_OUTDIR)
     882 endif
     883endef
     884
     885##
     886# Function to call to set _0_OUTDIR, _DEFPATH, and _MAKEFILE earlier than subfooter.
     887# Can be used to avoid exploiting double expansion.
     888#
     889# @param 1     The target name.
     890KB_FN_DO_PASS0_ON_TARGET = $(foreach target,$1,$(if-expr defined($(target)_0_OUTDIR),,$(evalval def_subfooter_header_target_pass)))
    860891
    861892##
     
    17121743
    17131744
    1714 ##
    1715 # An internal define used by subheader.kmk, subfooter.kmk, and
    1716 # KB_FN_DO_PASS0_ON_TARGET.
    1717 #
    1718 # @param target    The target to process.
    1719 #
    1720 define def_subfooter_header_target_pass
    1721  ifndef $(target)_PATH
    1722   ifndef $(target)_DEFPATH
    1723    $(target)_DEFPATH := $(PATH_SUB_CURRENT)
    1724   endif
    1725   $(call KB_FN_ASSIGN_DEPRECATED,$(target)_PATH,$($(target)_DEFPATH), $(target)_DEFPATH)
    1726  else ifndef $(target)_DEFPATH
    1727   $(target)_DEFPATH := $($(target)_PATH)
    1728  endif
    1729  ifndef $(target)_MAKEFILE
    1730   $(target)_MAKEFILE := $(MAKEFILE_CURRENT)
    1731  endif
    1732  ifndef $(target)_0_OUTDIR
    1733   $(target)_0_OUTDIR := $(call TARGET_PATH,$(target))
    1734   $(call KB_FN_ASSIGN_DEPRECATED,PATH_$(target),$($(target)_0_OUTDIR), $(target)_0_OUTDIR)
    1735  endif
    1736 endef
    1737 
    1738 ##
    1739 # Function to call to set _0_OUTDIR, _DEFPATH, and _MAKEFILE earlier than subfooter.
    1740 # Can be used to avoid exploiting double expansion.
    1741 #
    1742 # @param 1     The target name.
    1743 KB_FN_DO_PASS0_ON_TARGET = $(foreach target,$1,$(if-expr defined($(target)_0_OUTDIR),,$(evalval def_subfooter_header_target_pass)))
    1744 
    1745 
    17461745#
    17471746# Validate any KBUILD_BLD_TYPES additions and finally the KBUILD_TYPE.
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette