| 1 |
# $Progeny$ |
| 2 |
|
| 3 |
prefix = /usr |
| 4 |
datadir = $(prefix)/share |
| 5 |
execdir = $(datadir)/tools |
| 6 |
hwlistsdir = $(datadir)/discover |
| 7 |
|
| 8 |
DESTDIR = |
| 9 |
|
| 10 |
MAJOR=2 |
| 11 |
DATE=$(shell date +%Y.%m.%d) |
| 12 |
VERSION=$(MAJOR).$(DATE) |
| 13 |
DISTNAME=discover-data-$(VERSION) |
| 14 |
|
| 15 |
############################################################# |
| 16 |
# Kernel values used when generating the discover v1 data set |
| 17 |
############################################################# |
| 18 |
# Woody = 2.4.27, Sarge = n/a, Etch = n/a |
| 19 |
KVERSION_24 = 2.4.27 |
| 20 |
|
| 21 |
# Woody = ?, Sarge = 2.6.8, Etch = 2.6.18 |
| 22 |
KVERSION_26 = 2.6.21 |
| 23 |
|
| 24 |
# Woody = 4.2.1 (XFree86), Sarge = 4.3.0 (XFree86), Etch = 7.1 (X.org) |
| 25 |
XVER = 7.3 |
| 26 |
############################################################# |
| 27 |
|
| 28 |
discover_data_EXEC = lst2xml merge-lst-to-xml mkshorthwlist reduce-xml xml2lst \ |
| 29 |
discover-updater.pl trim26lst |
| 30 |
hwlists_DATA = ata-busclass.xml \ |
| 31 |
ata-device.xml \ |
| 32 |
ata-vendor.xml \ |
| 33 |
pci-busclass.xml \ |
| 34 |
pci-device.xml \ |
| 35 |
pci-device-deb.xml \ |
| 36 |
pci-vendor.xml \ |
| 37 |
pcmcia-busclass.xml \ |
| 38 |
pcmcia-device.xml \ |
| 39 |
pcmcia-vendor.xml \ |
| 40 |
scsi-busclass.xml \ |
| 41 |
scsi-device.xml \ |
| 42 |
scsi-vendor.xml \ |
| 43 |
usb-busclass.xml \ |
| 44 |
usb-device.xml \ |
| 45 |
usb-vendor.xml |
| 46 |
GENERATED = list.xml |
| 47 |
EXTRA_DIST = Makefile Makefile.update merged_vendor_list.xls \ |
| 48 |
ChangeLog README list.xml.in di-kernel-list \ |
| 49 |
merge-device-xml pci-ids2xml xml-device-sort.xsl |
| 50 |
all: $(discover_data_EXEC) $(hwlists_DATA) $(GENERATED) |
| 51 |
|
| 52 |
list.xml: list.xml.in |
| 53 |
sed s,@HWLISTSDIR@,$(hwlistsdir),g < list.xml.in > list.xml |
| 54 |
|
| 55 |
shortxmllists: $(hwlists_DATA) |
| 56 |
./reduce-xml --class-spec=linux:2.4 --class-spec=linux:2.6 \ |
| 57 |
--module-list=./di-kernel-list \ |
| 58 |
-i pci-vendor.xml -i pci-busclass.xml -i pci-device.xml \ |
| 59 |
-o pci-device-short.xml |
| 60 |
./reduce-xml --class-spec=linux:2.4 --class-spec=linux:2.6 \ |
| 61 |
--module-list=./di-kernel-list \ |
| 62 |
-i usb-vendor.xml -i usb-busclass.xml -i usb-device.xml \ |
| 63 |
-o usb-device-short.xml |
| 64 |
./reduce-xml --class-spec=linux:2.4 --class-spec=linux:2.6 \ |
| 65 |
--module-list=./di-kernel-list \ |
| 66 |
-i pci-vendor.xml -i pci-busclass.xml -i pci-device.xml \ |
| 67 |
-o pci-vendor-short.xml --output-type=vendor |
| 68 |
./reduce-xml --class-spec=linux:2.4 --class-spec=linux:2.6 \ |
| 69 |
--module-list=./di-kernel-list \ |
| 70 |
-i usb-vendor.xml -i usb-busclass.xml -i usb-device.xml \ |
| 71 |
-o usb-vendor-short.xml --output-type=vendor |
| 72 |
./reduce-xml --class-spec=linux:2.4 --class-spec=linux:2.6 \ |
| 73 |
--module-list=./di-kernel-list \ |
| 74 |
-i scsi-vendor.xml -i scsi-busclass.xml -i scsi-device.xml \ |
| 75 |
-o scsi-vendor-short.xml --output-type=vendor |
| 76 |
|
| 77 |
pci.lst: Makefile pci-busclass-v1.xml pci-vendor.xml pci-device.xml |
| 78 |
./xml2lst --previous-file=pci.lst \ |
| 79 |
--data-version=linux/module/name:$(KVERSION_24) \ |
| 80 |
--data-version=xfree86/server/name:$(XVER) \ |
| 81 |
--data-version=xfree86/server/device/driver:$(XVER) \ |
| 82 |
-opci-new.lst \ |
| 83 |
pci-busclass-v1.xml pci-vendor.xml pci-device.xml |
| 84 |
rm pci.lst |
| 85 |
mv pci-new.lst pci.lst |
| 86 |
|
| 87 |
pci-26.lst: Makefile pci-busclass-v1.xml pci-vendor.xml pci-device.xml |
| 88 |
./xml2lst --previous-file=pci-26.lst \ |
| 89 |
--data-version=linux/module/name:$(KVERSION_26) \ |
| 90 |
--data-version=xfree86/server/name:2 \ |
| 91 |
--data-version=xfree86/server/device/driver:2 \ |
| 92 |
-opci-26-new.lst \ |
| 93 |
pci-busclass-v1.xml pci-vendor.xml pci-device.xml |
| 94 |
# Need to skip video entries, to make sure discover --xdriver find the |
| 95 |
# entry in pci.lst |
| 96 |
./trim26lst < pci-26-new.lst > pci-26.lst |
| 97 |
rm pci-26-new.lst |
| 98 |
|
| 99 |
pcmcia.lst: Makefile pcmcia-busclass-v1.xml pcmcia-vendor.xml pcmcia-device.xml |
| 100 |
./xml2lst --previous-file=pcmcia.lst \ |
| 101 |
--data-version=linux/module/name:$(KVERSION_24) \ |
| 102 |
--data-version=xfree86/server/name:$(XVER) \ |
| 103 |
--data-version=xfree86/server/device/driver:$(XVER) \ |
| 104 |
-opcmcia-new.lst \ |
| 105 |
pcmcia-busclass-v1.xml pcmcia-vendor.xml pcmcia-device.xml |
| 106 |
rm pcmcia.lst |
| 107 |
mv pcmcia-new.lst pcmcia.lst |
| 108 |
|
| 109 |
pcmcia-26.lst: Makefile pcmcia-busclass-v1.xml pcmcia-vendor.xml pcmcia-device.xml |
| 110 |
./xml2lst --previous-file=pcmcia-26.lst \ |
| 111 |
--data-version=linux/module/name:$(KVERSION_26) \ |
| 112 |
--data-version=xfree86/server/name:2 \ |
| 113 |
--data-version=xfree86/server/device/driver:2 \ |
| 114 |
-opcmcia-26-new.lst \ |
| 115 |
pcmcia-busclass-v1.xml pcmcia-vendor.xml pcmcia-device.xml |
| 116 |
./trim26lst < pcmcia-26-new.lst > pcmcia-26.lst |
| 117 |
rm pcmcia-26-new.lst |
| 118 |
|
| 119 |
usb.lst: Makefile usb-busclass-v1.xml usb-vendor.xml usb-device.xml |
| 120 |
./xml2lst --previous-file=usb.lst \ |
| 121 |
--data-version=linux/module/name:$(KVERSION_24) \ |
| 122 |
--data-version=xfree86/server/name:$(XVER) \ |
| 123 |
--data-version=xfree86/server/device/driver:$(XVER) \ |
| 124 |
-ousb-new.lst \ |
| 125 |
usb-busclass-v1.xml usb-vendor.xml usb-device.xml |
| 126 |
rm usb.lst |
| 127 |
mv usb-new.lst usb.lst |
| 128 |
|
| 129 |
usb-26.lst: Makefile usb-busclass-v1.xml usb-vendor.xml usb-device.xml |
| 130 |
./xml2lst --previous-file=usb-26.lst \ |
| 131 |
--data-version=linux/module/name:$(KVERSION_26) \ |
| 132 |
--data-version=xfree86/server/name:2 \ |
| 133 |
--data-version=xfree86/server/device/driver:2 \ |
| 134 |
-ousb-26-new.lst \ |
| 135 |
usb-busclass-v1.xml usb-vendor.xml usb-device.xml |
| 136 |
./trim26lst < usb-26-new.lst > usb-26.lst |
| 137 |
rm usb-26-new.lst |
| 138 |
|
| 139 |
install: $(hwlists_DATA) $(GENERATED) |
| 140 |
install -m 755 -d $(DESTDIR)$(hwlistsdir) |
| 141 |
install -m 644 $(hwlists_DATA) $(GENERATED) $(DESTDIR)$(hwlistsdir) |
| 142 |
install -m 755 -d $(DESTDIR)$(execdir) |
| 143 |
install -m 755 $(discover_data_EXEC) $(DESTDIR)$(execdir) |
| 144 |
|
| 145 |
uninstall: |
| 146 |
for i in $(hwlists_DATA) $(GENERATED); do rm $(DESTDIR)$(hwlistsdir)/$$i; done |
| 147 |
for i in $(discover_data_EXEC); do rm $(DESTDIR)$(execdir)/$$i; done |
| 148 |
-rmdir $(DESTDIR)$(hwlistsdir) |
| 149 |
-rmdir $(DESTDIR)$(execdir) |
| 150 |
|
| 151 |
dist: clean |
| 152 |
rm -rf $(DISTNAME) |
| 153 |
mkdir $(DISTNAME) |
| 154 |
cp $(hwlists_DATA) \ |
| 155 |
$(discover_data_EXEC) $(EXTRA_DIST) $(DISTNAME) |
| 156 |
tar cf - $(DISTNAME) | gzip -9 > $(DISTNAME).tar.gz |
| 157 |
md5sum $(DISTNAME).tar.gz > $(DISTNAME).tar.gz.md5sum |
| 158 |
rm -rf $(DISTNAME) |
| 159 |
|
| 160 |
clean:: |
| 161 |
rm -f *.xml-short |
| 162 |
rm -f list.xml |
| 163 |
rm -f *~ |
| 164 |
|
| 165 |
distclean: clean |
| 166 |
|
| 167 |
.PHONY: all install uninstall dist |