]> git.ipfire.org Git - thirdparty/systemd.git/blame - hwdb.d/meson.build
udev-builtin-blkid: add support for --hint offsets
[thirdparty/systemd.git] / hwdb.d / meson.build
CommitLineData
db9ecf05 1# SPDX-License-Identifier: LGPL-2.1-or-later
3a726fcd 2
aa549ff3
ZJS
3# Those files right now are not supported by the grammar. Also,
4# they are very long but quite repetitive and the parser is not very fast.
5# So we don't "test" them.
6hwdb_files_notest = files('''
8723ddc7 7 20-dmi-id.hwdb
37efbbd8
ZJS
8 20-pci-vendor-model.hwdb
9 20-pci-classes.hwdb
10 20-usb-vendor-model.hwdb
11 20-usb-classes.hwdb
12 20-sdio-vendor-model.hwdb
13 20-sdio-classes.hwdb
14 20-bluetooth-vendor-product.hwdb
15 20-acpi-vendor.hwdb
16 20-OUI.hwdb
17 20-net-ifname.hwdb
2063b554 18 20-vmbus-class.hwdb
aa549ff3
ZJS
19'''.split())
20
21hwdb_files_test = files('''
39d5b72e 22 60-autosuspend.hwdb
37efbbd8 23 60-evdev.hwdb
4a6ab3f7 24 60-input-id.hwdb
37efbbd8
ZJS
25 60-keyboard.hwdb
26 60-sensor.hwdb
816be2ba 27 70-joystick.hwdb
37efbbd8
ZJS
28 70-mouse.hwdb
29 70-pointingstick.hwdb
30 70-touchpad.hwdb
5c23128d
ZJS
31'''.split())
32
349cc4a5 33if conf.get('ENABLE_HWDB') == 1
aa549ff3
ZJS
34 auto_suspend_rules = custom_target(
35 '60-autosuspend-chromiumos.hwdb',
36 output : '60-autosuspend-chromiumos.hwdb',
37 command : make_autosuspend_rules_py,
38 capture : true,
39 install : true,
40 install_dir: udevhwdbdir)
41
42 install_data(hwdb_files_notest,
43 hwdb_files_test,
37efbbd8 44 install_dir : udevhwdbdir)
94e75a54 45
d7aa78c3
JT
46 if install_sysconfdir
47 meson.add_install_script('sh', '-c',
48 mkdir_p.format(join_paths(sysconfdir, 'udev/hwdb.d')))
f6e49d4e 49
d7aa78c3
JT
50 meson.add_install_script('sh', '-c',
51 'test -n "$DESTDIR" || @0@/systemd-hwdb update'
52 .format(rootbindir))
53 endif
abba22c5 54
aa549ff3
ZJS
55 if want_tests != 'false'
56 parse_hwdb_py = find_program('parse_hwdb.py')
57 test('parse-hwdb',
58 parse_hwdb_py,
59 args : [hwdb_files_test,
60 auto_suspend_rules],
61 timeout : 90)
62 endif
938be089 63endif
26bd4b7f
ZJS
64
65############################################################
66
a923e085 67run_target(
9e82570e 68 'hwdb-update',
37efbbd8 69 command : [hwdb_update_sh, meson.current_source_dir()])
62d39995
ZJS
70
71run_target(
72 'autosuspend-update',
73 command : [autosuspend_update_sh, project_source_root + '/tools/chromiumos'])