1234567891011121314151617181920212223242526272829 |
- local platform_info = require 'platform_info'
- local util = require 'gluon.util'
- local setmetatable = setmetatable
- module 'gluon.platform'
- setmetatable(_M,
- {
- __index = platform_info,
- }
- )
- function match(target, subtarget, boards)
- if get_target() ~= target then
- return false
- end
- if get_subtarget() ~= subtarget then
- return false
- end
- if boards and not util.contains(boards, get_board_name()) then
- return false
- end
- return true
- end
|