]> git.ipfire.org Git - thirdparty/systemd.git/blame - hwdb.d/meson.build
ask-passwd: drop a condition which is always false
[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('''
37efbbd8
ZJS
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
2063b554 17 20-vmbus-class.hwdb
aa549ff3
ZJS
18'''.split())
19
20hwdb_files_test = files('''
39d5b72e 21 60-autosuspend.hwdb
37efbbd8 22 60-evdev.hwdb
4a6ab3f7 23 60-input-id.hwdb
37efbbd8
ZJS
24 60-keyboard.hwdb
25 60-sensor.hwdb
816be2ba 26 70-joystick.hwdb
37efbbd8
ZJS
27 70-mouse.hwdb
28 70-pointingstick.hwdb
29 70-touchpad.hwdb
5c23128d
ZJS
30'''.split())
31
349cc4a5 32if conf.get('ENABLE_HWDB') == 1
aa549ff3
ZJS
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,
37efbbd8 43 install_dir : udevhwdbdir)
94e75a54 44
d7aa78c3
JT
45 if install_sysconfdir
46 meson.add_install_script('sh', '-c',
47 mkdir_p.format(join_paths(sysconfdir, 'udev/hwdb.d')))
f6e49d4e 48
d7aa78c3
JT
49 meson.add_install_script('sh', '-c',
50 'test -n "$DESTDIR" || @0@/systemd-hwdb update'
51 .format(rootbindir))
52 endif
abba22c5 53
aa549ff3
ZJS
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
938be089 62endif
26bd4b7f
ZJS
63
64############################################################
65
a923e085 66run_target(
9e82570e 67 'hwdb-update',
37efbbd8 68 command : [hwdb_update_sh, meson.current_source_dir()])
62d39995
ZJS
69
70run_target(
71 'autosuspend-update',
72 command : [autosuspend_update_sh, project_source_root + '/tools/chromiumos'])