VirtualBox

Changeset 2533 in kBuild


Ignore:
Timestamp:
Aug 2, 2011 1:06:27 PM (13 years ago)
Author:
bird
Message:

header.kmk: Better assertion message.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/header.kmk

    r2531 r2533  
    850850
    851851##
     852# Show an assertion message.
     853#
     854# @param   $1   The assertion name.
     855# @param   $2   The details.
     856#
     857define KB_FN_ASSERT_MSG
     858$(info !! kBuild $1 Assertion Failed !!)
     859ifdef target
     860 $(info !! target:   $(target))
     861 local varloc := $(where $(target))
     862 if "$(varloc)" == "undefined"
     863  local varloc := $(where $(target)_TEMPLATE)
     864 endif
     865 if "$(varloc)" == "undefined"
     866  local varloc := $(where $(target)_SOURCES)
     867 endif
     868 if "$(varloc)" == "undefined"
     869  local varloc := $(where $(target)_EXTENDS)
     870 endif
     871 if "$(varloc)" == "undefined"
     872  local varloc := $(where target)
     873 endif
     874 ifneq ($(varloc),)
     875  $(info !! location: $(varloc))
     876 else
     877  $(info !! probable location: $($(target)_DEFPATH)/Makefile.kmk)
     878 endif
     879endif
     880$(info !! $2)
     881$(error fixme)
     882endef
     883
     884##
    852885# Throw an error if the given path $1 isn't absolute and assertions are enabled.
    853886#
     
    856889ifdef KBUILD_INTERNAL_STRICT
    857890 KB_FN_ASSERT_ABSPATH = $(if-expr "$(abspath $($(strip $1)))" != "$(strip $($(strip $1)))",\
    858         $(error kBuild abspath assertion failed: target=$(target) $1=$($(strip $1))))
     891        $(evalcall KB_FN_ASSERT_MSG,abspath,$1 is:$(NLTAB)'$($(strip $1))'$(NLTAB)expected:$(NLTAB)'$(abspath $($(strip $1)))'))
    859892else
    860893 KB_FN_ASSERT_ABSPATH :=
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