]>
Commit | Line | Data |
---|---|---|
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. | |
f1b98127 ZJS |
6 | hwdb_files_notest = files( |
7 | 'README', | |
8 | '20-dmi-id.hwdb', | |
9 | '20-pci-vendor-model.hwdb', | |
10 | '20-pci-classes.hwdb', | |
11 | '20-usb-vendor-model.hwdb', | |
12 | '20-usb-classes.hwdb', | |
13 | '20-sdio-vendor-model.hwdb', | |
14 | '20-sdio-classes.hwdb', | |
15 | '20-bluetooth-vendor-product.hwdb', | |
16 | '20-acpi-vendor.hwdb', | |
17 | '20-OUI.hwdb', | |
18 | '20-net-ifname.hwdb', | |
19 | '20-vmbus-class.hwdb') | |
aa549ff3 | 20 | |
f1b98127 ZJS |
21 | hwdb_files_test = files( |
22 | '60-autosuspend.hwdb', | |
23 | '60-autosuspend-fingerprint-reader.hwdb', | |
24 | '60-evdev.hwdb', | |
25 | '60-input-id.hwdb', | |
26 | '60-keyboard.hwdb', | |
27 | '60-seat.hwdb', | |
28 | '60-sensor.hwdb', | |
29 | '70-analyzers.hwdb', | |
f2c36c0e | 30 | '70-av-production.hwdb', |
f1b98127 ZJS |
31 | '70-cameras.hwdb', |
32 | '70-joystick.hwdb', | |
33 | '70-mouse.hwdb', | |
34 | '70-pda.hwdb', | |
35 | '70-pointingstick.hwdb', | |
36 | '70-touchpad.hwdb', | |
37 | '80-ieee1394-unit-function.hwdb') | |
5c23128d | 38 | |
349cc4a5 | 39 | if conf.get('ENABLE_HWDB') == 1 |
aa549ff3 ZJS |
40 | auto_suspend_rules = custom_target( |
41 | '60-autosuspend-chromiumos.hwdb', | |
42 | output : '60-autosuspend-chromiumos.hwdb', | |
43 | command : make_autosuspend_rules_py, | |
44 | capture : true, | |
45 | install : true, | |
46 | install_dir: udevhwdbdir) | |
47 | ||
48 | install_data(hwdb_files_notest, | |
49 | hwdb_files_test, | |
37efbbd8 | 50 | install_dir : udevhwdbdir) |
94e75a54 | 51 | |
d7aa78c3 | 52 | if install_sysconfdir |
7c22f07c | 53 | meson.add_install_script('sh', '-c', |
fce9abb2 | 54 | mkdir_p.format(sysconfdir / 'udev/hwdb.d')) |
f6e49d4e | 55 | |
7c22f07c | 56 | meson.add_install_script('sh', '-c', |
0f4c4f38 | 57 | 'test -n "$DESTDIR" || @0@/systemd-hwdb update'.format(rootbindir)) |
d7aa78c3 | 58 | endif |
abba22c5 | 59 | |
aa549ff3 ZJS |
60 | if want_tests != 'false' |
61 | parse_hwdb_py = find_program('parse_hwdb.py') | |
62 | test('parse-hwdb', | |
63 | parse_hwdb_py, | |
14056a52 | 64 | suite : 'dist-check', |
aa549ff3 ZJS |
65 | args : [hwdb_files_test, |
66 | auto_suspend_rules], | |
67 | timeout : 90) | |
68 | endif | |
938be089 | 69 | endif |
26bd4b7f ZJS |
70 | |
71 | ############################################################ | |
72 | ||
a923e085 | 73 | run_target( |
4095cff0 ZJS |
74 | 'update-hwdb', |
75 | command : [update_hwdb_sh, meson.current_source_dir()]) | |
62d39995 ZJS |
76 | |
77 | run_target( | |
816f31d0 ZJS |
78 | 'update-hwdb-autosuspend', |
79 | command : [update_hwdb_autosuspend_sh, project_source_root]) |