Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This class can be used to make it possible to RRECOMMENDS_${PN} a package
- # that may not be possible to create for the current machine. It is used by
- # specifying the supported machines in SUPPORTED_MACHINE (it works exactly as
- # COMPATIBLE_MACHINE). If not building for one of the supported machines, an
- # empty package will be created and a warning is produced.
- python() {
- need_machine = d.getVar('SUPPORTED_MACHINE', True)
- if need_machine:
- import re
- compat_machines = (d.getVar('MACHINEOVERRIDES', True) or "").split(":")
- for m in compat_machines:
- if re.match(need_machine, m):
- break
- else:
- d.setVar('SRC_URI', '')
- bb.build.deltask('configure', d)
- bb.build.deltask('compile', d)
- bb.build.deltask('install', d)
- # Produce a warning when packaging
- for t in ['do_package_write_deb',
- 'do_package_write_ipk',
- 'do_package_write_rpm',
- 'do_package_write_deb_setscene',
- 'do_package_write_ipk_setscene',
- 'do_package_write_rpm_setscene']:
- d.prependVarFlag(t, 'prefuncs', 'warn_non_supported_machine ')
- }
- warn_non_supported_machine() {
- bbwarn "Creating an empty package since the current machine is unsupported!"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement