Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 1 | # |
| 2 | # Copyright OpenEmbedded Contributors |
| 3 | # |
| 4 | # SPDX-License-Identifier: MIT |
| 5 | # |
| 6 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 7 | python mcextend_virtclass_handler () { |
| 8 | cls = e.data.getVar("BBEXTENDCURR") |
| 9 | variant = e.data.getVar("BBEXTENDVARIANT") |
| 10 | if cls != "mcextend" or not variant: |
| 11 | return |
| 12 | |
| 13 | override = ":virtclass-mcextend-" + variant |
| 14 | |
| 15 | e.data.setVar("PN", e.data.getVar("PN", False) + "-" + variant) |
| 16 | e.data.setVar("MCNAME", variant) |
| 17 | e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + override) |
| 18 | } |
| 19 | |
| 20 | addhandler mcextend_virtclass_handler |
| 21 | mcextend_virtclass_handler[eventmask] = "bb.event.RecipePreFinalise" |
| 22 | |