Systemd/hwdb/meson.build
Zbigniew Jędrzejewski-Szmek 2c201c2140 meson: use booleans for conf.set and drop unecessary conditionals
Using conf.set() with a boolean argument does the right thing:
either #ifdef or #undef. This means that conf.set can be used unconditionally.

Previously I used '1' as the placeholder value, and that needs to be changed to
'true' for consistency (under meson 1 cannot be used in boolean context). All
checks need to be adjusted.
2017-05-02 16:29:11 -04:00

43 lines
1.2 KiB
Meson

hwdb_files = files('''
20-pci-vendor-model.hwdb
20-pci-classes.hwdb
20-usb-vendor-model.hwdb
20-usb-classes.hwdb
20-sdio-vendor-model.hwdb
20-sdio-classes.hwdb
20-bluetooth-vendor-product.hwdb
20-acpi-vendor.hwdb
20-OUI.hwdb
20-net-ifname.hwdb
60-evdev.hwdb
60-keyboard.hwdb
60-sensor.hwdb
70-mouse.hwdb
70-pointingstick.hwdb
70-touchpad.hwdb
'''.split())
if conf.get('ENABLE_HWDB', false)
install_data(hwdb_files,
install_dir : udevhwdbdir)
meson.add_install_script('sh', '-c',
mkdir_p.format(join_paths(sysconfdir, 'udev/hwdb.d')))
meson.add_install_script('sh', '-c',
'test -n "$DESTDIR" || @0@/systemd-hwdb update'
.format(rootbindir))
endif
############################################################
parse_hwdb_py = find_program('parse_hwdb.py')
test('parse-hwdb',
parse_hwdb_py)
############################################################
run_target(
'update',
command : [hwdb_update_sh, meson.current_source_dir()])