]> git.ipfire.org Git - thirdparty/systemd.git/blame - hwdb.d/meson.build
docs: document new description field
[thirdparty/systemd.git] / hwdb.d / meson.build
CommitLineData
3a726fcd 1# SPDX-License-Identifier: LGPL-2.1+
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
37efbbd8
ZJS
45 meson.add_install_script('sh', '-c',
46 mkdir_p.format(join_paths(sysconfdir, 'udev/hwdb.d')))
f6e49d4e 47
37efbbd8
ZJS
48 meson.add_install_script('sh', '-c',
49 'test -n "$DESTDIR" || @0@/systemd-hwdb update'
50 .format(rootbindir))
abba22c5 51
aa549ff3
ZJS
52 if want_tests != 'false'
53 parse_hwdb_py = find_program('parse_hwdb.py')
54 test('parse-hwdb',
55 parse_hwdb_py,
56 args : [hwdb_files_test,
57 auto_suspend_rules],
58 timeout : 90)
59 endif
938be089 60endif
26bd4b7f
ZJS
61
62############################################################
63
a923e085 64run_target(
9e82570e 65 'hwdb-update',
37efbbd8 66 command : [hwdb_update_sh, meson.current_source_dir()])
62d39995
ZJS
67
68run_target(
69 'autosuspend-update',
70 command : [autosuspend_update_sh, project_source_root + '/tools/chromiumos'])