diff options
Diffstat (limited to 'meta-xilinx-core/classes/xilinx-deprecated.bbclass')
-rw-r--r-- | meta-xilinx-core/classes/xilinx-deprecated.bbclass | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/meta-xilinx-core/classes/xilinx-deprecated.bbclass b/meta-xilinx-core/classes/xilinx-deprecated.bbclass new file mode 100644 index 00000000..1aee2fe1 --- /dev/null +++ b/meta-xilinx-core/classes/xilinx-deprecated.bbclass @@ -0,0 +1,18 @@ +# Class to add a deprecated warning from various configuration files. + +# Immediately after the ConfigParsed event handler, warn the user of any +# deprecated files the user has used. +addhandler xilinx_deprecated_config_eventhandler +xilinx_deprecated_config_eventhandler[eventmask] = "bb.event.ConfigParsed" +python xilinx_deprecated_config_eventhandler () { + # Check for BOARD & BOARD_VARIANT usage + if d.getVar('BOARD') or d.getVar('BOARD_VARIANT'): + bb.error("Deprecated BOARD (%s) or BOARD_VARIANT (%s) is being used, they are no longer supported and are ignored." % (d.getVar('BOARD'), d.getVar('BOARD_VARIANT'))) + + msg_list = d.getVarFlags('XILINX_DEPRECATED') or [] + for msg_source in msg_list: + if msg_source == "doc": + continue + msg = d.getVarFlag('XILINX_DEPRECATED', msg_source) or "" + bb.warn('%s: %s' % (msg_source, msg)) +} |