blob: 62769fb4122892d4736358ff5a8957871240a099 [file] [log] [blame]
#
# Copyright (c) 2024, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
space :=
space := $(space) $(space)
comma := ,
null :=
compat-path = $(subst $(space),$(null),$(1))
decompat-path = $(subst $(null), ,$(1))
absolute-path = $(call decompat-path,$(abspath $(call compat-path,$(1))))
real-path = $(call decompat-path,$(realpath $(call compat-path,$(1))))
file-name = $(call decompat-path,$(notdir $(call compat-path,$(1))))
directory-name = $(call decompat-path,$(dir $(call compat-path,$(1))))
escape-shell = '$(subst ','\'',$(1))'