blob: fc161514aebafe6f78a5e79ab179b81bb9464d21 [file] [log] [blame]
Vivekbalachandar Mb6e5dbf2020-02-17 12:15:26 +05301# Enter project path into pathmap
2#
3# $(1): name
4# $(2): path
5#
6define project-set-path
7$(eval pathmap_PROJ += $(1):$(2))
8endef
9
10# Enter variant project path into pathmap
11#
12# $(1): name
13# $(2): variable to check
14# $(3): base path
15#
16define project-set-path-variant
17 $(call project-set-path,$(1),$(strip \
18 $(if $($(2)), \
19 $(3)-$($(2)), \
20 $(3))))
21endef
22
23# Returns the path to the requested module's include directory,
24# relative to the root of the source tree.
25#
26# $(1): a list of modules (or other named entities) to find the projects for
27define project-path-for
28$(foreach n,$(1),$(patsubst $(n):%,%,$(filter $(n):%,$(pathmap_PROJ))))
29endef
30