Vivekbalachandar M | b6e5dbf | 2020-02-17 12:15:26 +0530 | [diff] [blame] | 1 | # Enter project path into pathmap |
| 2 | # |
| 3 | # $(1): name |
| 4 | # $(2): path |
| 5 | # |
| 6 | define project-set-path |
| 7 | $(eval pathmap_PROJ += $(1):$(2)) |
| 8 | endef |
| 9 | |
| 10 | # Enter variant project path into pathmap |
| 11 | # |
| 12 | # $(1): name |
| 13 | # $(2): variable to check |
| 14 | # $(3): base path |
| 15 | # |
| 16 | define project-set-path-variant |
| 17 | $(call project-set-path,$(1),$(strip \ |
| 18 | $(if $($(2)), \ |
| 19 | $(3)-$($(2)), \ |
| 20 | $(3)))) |
| 21 | endef |
| 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 |
| 27 | define project-path-for |
| 28 | $(foreach n,$(1),$(patsubst $(n):%,%,$(filter $(n):%,$(pathmap_PROJ)))) |
| 29 | endef |
| 30 | |