Use curl, with the correct settings to avoid re-fetching files.
[oweals/hwids.git] / Makefile
1 ifeq "$(V)" "0"
2   STATUS = git status -s
3   Q=@
4 else
5   STATUS = git status
6   Q=
7 endif
8
9 fetch:
10         $(Q)curl -z pci.ids -o pci.ids -R http://pci-ids.ucw.cz/v2.2/pci.ids
11         $(Q)curl -z usb.ids -o usb.ids -R http://www.linux-usb.org/usb.ids
12         $(Q)curl -z oui.txt -o oui.txt -R http://standards.ieee.org/develop/regauth/oui/oui.txt
13         $(Q)curl -z iab.txt -o iab.txt -R http://standards.ieee.org/develop/regauth/iab/iab.txt
14         $(Q)curl -z udev/20-acpi-vendor.hwdb -o udev/20-acpi-vendor.hwdb -R http://cgit.freedesktop.org/systemd/systemd/plain/hwdb/20-acpi-vendor.hwdb
15         $(Q)curl -z udev-hwdb-update.pl -o udev-hwdb-update.pl -R http://cgit.freedesktop.org/systemd/systemd/plain/hwdb/ids-update.pl
16         $(Q)$(STATUS)
17
18 PV ?= $(shell ( awk '$$2 == "Date:" { print $$3; nextfile }' pci.ids usb.ids; git log --format=format:%ci -1 -- oui.txt hwdb/20-acpi-vendor.hwdb udev-hwdb-update.pl | cut -d ' ' -f1; ) | sort | tail -n 1 | tr -d -)
19 P = hwids-$(PV)
20
21 tag:
22         git tag $(P)
23
24 udev-hwdb:
25         perl ./udev-hwdb-update.pl && mv *.hwdb udev/