]> git.ipfire.org Git - thirdparty/systemd.git/blame - hwdb.d/meson.build
Merge pull request #18886 from anitazha/shutdownconsole
[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('''
d83e90c7 7 README
8723ddc7 8 20-dmi-id.hwdb
37efbbd8
ZJS
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
2063b554 19 20-vmbus-class.hwdb
aa549ff3
ZJS
20'''.split())
21
22hwdb_files_test = files('''
39d5b72e 23 60-autosuspend.hwdb
b25e76ea 24 60-autosuspend-fingerprint-reader.hwdb
37efbbd8 25 60-evdev.hwdb
4a6ab3f7 26 60-input-id.hwdb
37efbbd8
ZJS
27 60-keyboard.hwdb
28 60-sensor.hwdb
816be2ba 29 70-joystick.hwdb
37efbbd8
ZJS
30 70-mouse.hwdb
31 70-pointingstick.hwdb
32 70-touchpad.hwdb
5c23128d
ZJS
33'''.split())
34
349cc4a5 35if conf.get('ENABLE_HWDB') == 1
aa549ff3
ZJS
36 auto_suspend_rules = custom_target(
37 '60-autosuspend-chromiumos.hwdb',
38 output : '60-autosuspend-chromiumos.hwdb',
39 command : make_autosuspend_rules_py,
40 capture : true,
41 install : true,
42 install_dir: udevhwdbdir)
43
44 install_data(hwdb_files_notest,
45 hwdb_files_test,
37efbbd8 46 install_dir : udevhwdbdir)
94e75a54 47
d7aa78c3
JT
48 if install_sysconfdir
49 meson.add_install_script('sh', '-c',
50 mkdir_p.format(join_paths(sysconfdir, 'udev/hwdb.d')))
f6e49d4e 51
d7aa78c3
JT
52 meson.add_install_script('sh', '-c',
53 'test -n "$DESTDIR" || @0@/systemd-hwdb update'
54 .format(rootbindir))
55 endif
abba22c5 56
aa549ff3
ZJS
57 if want_tests != 'false'
58 parse_hwdb_py = find_program('parse_hwdb.py')
59 test('parse-hwdb',
60 parse_hwdb_py,
61 args : [hwdb_files_test,
62 auto_suspend_rules],
63 timeout : 90)
64 endif
938be089 65endif
26bd4b7f
ZJS
66
67############################################################
68
a923e085 69run_target(
4095cff0
ZJS
70 'update-hwdb',
71 command : [update_hwdb_sh, meson.current_source_dir()])
62d39995
ZJS
72
73run_target(
816f31d0
ZJS
74 'update-hwdb-autosuspend',
75 command : [update_hwdb_autosuspend_sh, project_source_root])