VirtualBox

Changeset 3632 in kBuild for trunk


Ignore:
Timestamp:
Oct 25, 2024 11:26:28 PM (5 weeks ago)
Author:
bird
Message:

header.kmk: Added KB_FN_LOAD_TOOL and KB_FN_LOAD_SDK for explictly loading a tool or an sdk implementation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/header.kmk

    r3630 r3632  
    10761076# @param 1     recipe name
    10771077KB_FN_AUTO_CMD_DEPS = $(call KB_FN_AUTO_CMD_DEPS_EX,$1,$1.auto-dep)
     1078
     1079##
     1080# Call this (evalcall) this to explictly load tool by name.
     1081#
     1082# @param 1      The tool name
     1083define KB_FN_LOAD_TOOL
     1084ifndef TOOL_$(1)
     1085 TOOL_$(1)_KMK_FILE := $(firstword $(foreach path, $(KBUILD_TOOL_PATHS) $(KBUILD_PATH)/tools $(KBUILD_DEFAULT_PATHS), $(wildcard $(path)/$(1).kmk)))
     1086 ifeq ($(TOOL_$(1)_KMK_FILE),)
     1087  $(error kBuild: Cannot find include file for the tool '$(1)'! Searched: $(KBUILD_TOOL_PATHS) $(KBUILD_PATH)/tools $(KBUILD_DEFAULT_PATHS))
     1088 endif
     1089 include $(TOOL_$(1)_KMK_FILE)
     1090 ifndef TOOL_$(1)
     1091  $(warning kBuild: TOOL_$(1) was not defined by $(TOOL_$(1)_KMK_FILE)!)
     1092 endif
     1093endif
     1094endef
     1095
     1096##
     1097# Call this (evalcall) this to explictly load an SDK by name.
     1098#
     1099# @param 1      The SDK name
     1100define KB_FN_LOAD_SDK
     1101ifndef SDK_$(1)
     1102 SDK_$(1)_KMK_FILE := $(firstword $(foreach path, $(KBUILD_SDK_PATHS) $(KBUILD_PATH)/sdks $(KBUILD_DEFAULT_PATHS), $(wildcard $(path)/$(1).kmk)))
     1103 ifeq ($(SDK_$(1)_KMK_FILE),)
     1104  $(error kBuild: Cannot find include file for the SDK '$(1)'! Searched: $(KBUILD_SDK_PATHS) $(KBUILD_PATH)/sdks $(KBUILD_DEFAULT_PATHS))
     1105 endif
     1106 include $(SDK_$(1)_KMK_FILE)
     1107 ifndef SDK_$(1)
     1108  $(warning kBuild: SDK_$(1) was not defined by $(SDK_$(1)_KMK_FILE)!)
     1109 endif
     1110endif
     1111endef
    10781112
    10791113
Note: See TracChangeset for help on using the changeset viewer.

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