meson: add hwdb/update target

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2017-04-15 00:40:59 -04:00
parent 177929c236
commit abba22c51c
4 changed files with 23 additions and 12 deletions

View File

@ -6602,18 +6602,8 @@ dist-check-includes: $(public_headers)
done; exit $$res
.PHONY: hwdb-update
hwdb-update:
( cd $(top_srcdir)/hwdb && \
wget -O usb.ids 'http://www.linux-usb.org/usb.ids' && \
wget -O pci.ids 'http://pci-ids.ucw.cz/v2.2/pci.ids' && \
wget -O ma-large.txt 'http://standards.ieee.org/develop/regauth/oui/oui.txt' && \
wget -O ma-medium.txt 'http://standards.ieee.org/develop/regauth/oui28/mam.txt' && \
wget -O ma-small.txt 'http://standards.ieee.org/develop/regauth/oui36/oui36.txt' && \
wget -O pnp_id_registry.html 'http://www.uefi.org/uefi-pnp-export' && \
wget -O acpi_id_registry.html 'http://www.uefi.org/uefi-acpi-export' && \
./ids-update.pl && \
./acpi-update.py > 20-acpi-vendor.hwdb.base && \
patch -p0 -o- 20-acpi-vendor.hwdb.base < 20-acpi-vendor.hwdb.patch > 20-acpi-vendor.hwdb )
hwdb-update: tools/meson-hwdb-update.sh
$< $(top_srcdir)/hwdb
.PHONY: built-sources
built-sources: $(BUILT_SOURCES)

View File

@ -26,3 +26,10 @@ if conf.get('ENABLE_HWDB', 0) == 1
meson.add_install_script('sh', '-c',
mkdir_p.format(join_paths(sysconfdir, 'udev/hwdb.d')))
endif
############################################################
custom_target(
'update',
output : 'update',
command : [hwdb_update_sh, meson.current_source_dir()])

View File

@ -2205,6 +2205,7 @@ test('test-libudev-sym',
make_directive_index_py = find_program('tools/make-directive-index.py')
make_man_index_py = find_program('tools/make-man-index.py')
xml_helper_py = find_program('tools/xml_helper.py')
hwdb_update_sh = find_program('tools/meson-hwdb-update.sh')
subdir('units')
subdir('sysctl.d')

13
tools/meson-hwdb-update.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh -ex
cd "$1"
wget -O usb.ids 'http://www.linux-usb.org/usb.ids'
wget -O pci.ids 'http://pci-ids.ucw.cz/v2.2/pci.ids'
wget -O ma-large.txt 'http://standards.ieee.org/develop/regauth/oui/oui.txt'
wget -O ma-medium.txt 'http://standards.ieee.org/develop/regauth/oui28/mam.txt'
wget -O ma-small.txt 'http://standards.ieee.org/develop/regauth/oui36/oui36.txt'
wget -O pnp_id_registry.html 'http://www.uefi.org/uefi-pnp-export'
wget -O acpi_id_registry.html 'http://www.uefi.org/uefi-acpi-export'
./ids-update.pl
./acpi-update.py > 20-acpi-vendor.hwdb.base
patch -p0 -o- 20-acpi-vendor.hwdb.base <20-acpi-vendor.hwdb.patch >20-acpi-vendor.hwdb