]> git.ipfire.org Git - thirdparty/systemd.git/blob - hwdb.d/meson.build
hwdb: Fix accel orientation quirk Z-axis for Lenovo ThinkPad Yoga 11e 3th gen
[thirdparty/systemd.git] / hwdb.d / meson.build
1 # SPDX-License-Identifier: LGPL-2.1-or-later
2
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.
6 hwdb_files_notest = files('''
7 20-pci-vendor-model.hwdb
8 20-pci-classes.hwdb
9 20-usb-vendor-model.hwdb
10 20-usb-classes.hwdb
11 20-sdio-vendor-model.hwdb
12 20-sdio-classes.hwdb
13 20-bluetooth-vendor-product.hwdb
14 20-acpi-vendor.hwdb
15 20-OUI.hwdb
16 20-net-ifname.hwdb
17 20-vmbus-class.hwdb
18 '''.split())
19
20 hwdb_files_test = files('''
21 60-autosuspend.hwdb
22 60-evdev.hwdb
23 60-input-id.hwdb
24 60-keyboard.hwdb
25 60-sensor.hwdb
26 70-joystick.hwdb
27 70-mouse.hwdb
28 70-pointingstick.hwdb
29 70-touchpad.hwdb
30 '''.split())
31
32 if conf.get('ENABLE_HWDB') == 1
33 auto_suspend_rules = custom_target(
34 '60-autosuspend-chromiumos.hwdb',
35 output : '60-autosuspend-chromiumos.hwdb',
36 command : make_autosuspend_rules_py,
37 capture : true,
38 install : true,
39 install_dir: udevhwdbdir)
40
41 install_data(hwdb_files_notest,
42 hwdb_files_test,
43 install_dir : udevhwdbdir)
44
45 if install_sysconfdir
46 meson.add_install_script('sh', '-c',
47 mkdir_p.format(join_paths(sysconfdir, 'udev/hwdb.d')))
48
49 meson.add_install_script('sh', '-c',
50 'test -n "$DESTDIR" || @0@/systemd-hwdb update'
51 .format(rootbindir))
52 endif
53
54 if want_tests != 'false'
55 parse_hwdb_py = find_program('parse_hwdb.py')
56 test('parse-hwdb',
57 parse_hwdb_py,
58 args : [hwdb_files_test,
59 auto_suspend_rules],
60 timeout : 90)
61 endif
62 endif
63
64 ############################################################
65
66 run_target(
67 'hwdb-update',
68 command : [hwdb_update_sh, meson.current_source_dir()])
69
70 run_target(
71 'autosuspend-update',
72 command : [autosuspend_update_sh, project_source_root + '/tools/chromiumos'])