]> git.ipfire.org Git - thirdparty/systemd.git/blame - hwdb.d/meson.build
meson: revert the change to unquote commands in add_install_script
[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
f125f8b1 33 80-ieee1394-unit-function.hwdb
5c23128d
ZJS
34'''.split())
35
349cc4a5 36if conf.get('ENABLE_HWDB') == 1
aa549ff3
ZJS
37 auto_suspend_rules = custom_target(
38 '60-autosuspend-chromiumos.hwdb',
39 output : '60-autosuspend-chromiumos.hwdb',
40 command : make_autosuspend_rules_py,
41 capture : true,
42 install : true,
43 install_dir: udevhwdbdir)
44
45 install_data(hwdb_files_notest,
46 hwdb_files_test,
37efbbd8 47 install_dir : udevhwdbdir)
94e75a54 48
d7aa78c3 49 if install_sysconfdir
7c22f07c
ZJS
50 meson.add_install_script('sh', '-c',
51 mkdir_p.format(join_paths(sysconfdir, 'udev/hwdb.d')))
f6e49d4e 52
7c22f07c 53 meson.add_install_script('sh', '-c',
0f4c4f38 54 'test -n "$DESTDIR" || @0@/systemd-hwdb update'.format(rootbindir))
d7aa78c3 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])