Chris Kay | 2c09bf6 | 2024-04-09 16:30:52 +0000 | [diff] [blame] | 1 | # |
| 2 | # Copyright (c) 2024, Arm Limited and Contributors. All rights reserved. |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | |
| 7 | space := |
| 8 | space := $(space) $(space) |
| 9 | comma := , |
| 10 | |
| 11 | null := � |
| 12 | |
| 13 | compat-path = $(subst $(space),$(null),$(1)) |
| 14 | decompat-path = $(subst $(null), ,$(1)) |
| 15 | |
| 16 | absolute-path = $(call decompat-path,$(abspath $(call compat-path,$(1)))) |
| 17 | real-path = $(call decompat-path,$(realpath $(call compat-path,$(1)))) |
| 18 | |
| 19 | file-name = $(call decompat-path,$(notdir $(call compat-path,$(1)))) |
| 20 | directory-name = $(call decompat-path,$(dir $(call compat-path,$(1)))) |
| 21 | |
| 22 | escape-shell = '$(subst ','\'',$(1))' |