]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: add hwdb/update target
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 15 Apr 2017 04:40:59 +0000 (00:40 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 24 Apr 2017 01:47:29 +0000 (21:47 -0400)
Makefile.am
hwdb/meson.build
meson.build
tools/meson-hwdb-update.sh [new file with mode: 0755]

index e362060326057de0a432ea4839a665d70a7abf65..18f4accb4fed425824d468dd22efa778f42a7517 100644 (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)
index cbc9016652210b039c9a1964aac3933700749b28..4498d5e08b9495af5b1b8931103baa2b3f063033 100644 (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()])
index 035e2f0424f39914c1c82dd312049495f3d41763..b752634c88c0aea02223db1a56e6fae584e8b3af 100644 (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')
diff --git a/tools/meson-hwdb-update.sh b/tools/meson-hwdb-update.sh
new file mode 100755 (executable)
index 0000000..339ebb9
--- /dev/null
@@ -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