summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-04-15 00:40:59 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-04-23 21:47:29 -0400
commitabba22c51c44871395316a73cf0e69106eeb94a1 (patch)
treefbc2d1d2e68cca127a64d0d64ebb473019caeccd
parent177929c2363d86ee17814f00d27e0dca4e327b40 (diff)
meson: add hwdb/update target
-rw-r--r--Makefile.am14
-rw-r--r--hwdb/meson.build7
-rw-r--r--meson.build1
-rwxr-xr-xtools/meson-hwdb-update.sh13
4 files changed, 23 insertions, 12 deletions
diff --git a/Makefile.am b/Makefile.am
index e362060326..18f4accb4f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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)
diff --git a/hwdb/meson.build b/hwdb/meson.build
index cbc9016652..4498d5e08b 100644
--- a/hwdb/meson.build
+++ b/hwdb/meson.build
@@ -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()])
diff --git a/meson.build b/meson.build
index 035e2f0424..b752634c88 100644
--- a/meson.build
+++ b/meson.build
@@ -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')
diff --git a/tools/meson-hwdb-update.sh b/tools/meson-hwdb-update.sh
new file mode 100755
index 0000000000..339ebb9ace
--- /dev/null
+++ b/tools/meson-hwdb-update.sh
@@ -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