/[soft]/ldetect-lst/trunk/lst/Makefile
ViewVC logotype

Contents of /ldetect-lst/trunk/lst/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1357 - (show annotations) (download)
Tue May 17 09:21:22 2011 UTC (12 years, 10 months ago) by dmorgan
File size: 2598 byte(s)
Import  ldetect
1 include ../Makefile.config
2
3 ARCH := $(patsubst i%86,i386,$(shell uname -m))
4 ARCH := $(patsubst sparc%,sparc,$(ARCH))
5
6 TABLES1 = pcitable usbtable
7 TABLES2 = isatable pcmciatable dmitable
8 TABLES3 = ScannerDB.gz
9 TABLES4 = scannerconfigs
10 TABLES = $(TABLES1) $(TABLES2)
11 TMP_TABLES1 = $(TABLES1:%=%.tmp)
12 TMP_TABLES2 = $(TABLES2:%=%.tmp)
13 TMP_TABLES = $(TABLES:%=%.tmp)
14
15 build: preferred-modules.alias
16
17 update-ids: new-usb-ids new-pci-ids new-oui-txt
18
19 clean:
20 rm -f *~ *.tmp ScannerDB.gz preferred-modules.alias fallback-modules.alias
21
22 check:
23 @../convert/merge2pcitable.pl pcitable pcitable.x86_64 pcitable.x86_64 > .pcitable
24 @diff -u pcitable.x86_64 .pcitable
25 @../convert/merge2pcitable.pl pcitable pcitable pcitable > .pcitable
26 @diff -u pcitable .pcitable
27 @../convert/merge2pcitable.pl pcitable usbtable usbtable > .usbtable
28 @LC_ALL=C.iso-8859-1 sed -e 's!\s"[^"]*"$$!!' < usbtable > .usbtable2
29 @diff -u .usbtable2 .usbtable
30 @cd ../convert; ./verify_Cards.pl
31 @rm -f .pcitable .usbtable*
32
33 fallback-modules.alias:
34 cp `ls -tr /lib/modules/*/modules.alias | tail -1` fallback-modules.alias
35
36 preferred-modules.alias: hardcoded-modules.alias fallback-modules.alias
37 @../convert/uniquify-modalias.pl > $@ 2>undecided.alias
38 @cat hardcoded-modules.alias >> $@
39
40 $(TMP_TABLES1): %.tmp: %
41 ../convert/merge2pcitable.pl pcitable $< $<.$(ARCH) > $@
42
43 $(TMP_TABLES2): %.tmp: %
44 cp -f $< $@
45
46 $(TABLES3):
47 gzip -vc9 ScannerDB > ScannerDB.gz
48
49 new-usb-ids:
50 @curl -O http://www.linux-usb.org/usb.ids
51
52 new-pci-ids:
53 @curl -O http://pciids.sourceforge.net/pci.ids
54
55 new-oui-txt:
56 @curl -O http://standards.ieee.org/regauth/oui/oui.txt
57
58 install: $(TMP_TABLES) $(TABLES3)
59 for i in $(TABLES); do \
60 mkdir -p $(dir)/$$i.d ; \
61 (echo "# This file was created:" `date '+%Y-%m-%d %H:%M:%S (%z)'` ; \
62 echo "# !! The latest version is available via SVN at" ; \
63 echo "# http://svn.mandriva.com/svn/soft/ldetect-lst/" ; \
64 cat $$i.tmp \
65 ) > $(dir)/$$i.d/90default.lst; done
66
67 gzip -9 $(dir)/{pcitable,usbtable,dmitable}.d/90default.lst
68
69 install -m 644 ScannerDB.gz scannerconfigs Cards+ MonitorsDB isdn.db $(dir)
70 # make MonitorDB looks fine for XFdrake (b/c of sync with RH):
71 perl -pi -e 's!^Generic CRT Display; Monitor !Generic; !; s!Generic LCD Display; LCD Panel !Generic; Flat Panel !' $(dir)/MonitorsDB
72
73 install -m 644 fallback-modules.alias $(dir)/fallback-modules.alias
74 install -D -m 644 preferred-modules.alias $(slibdir)/module-init-tools/ldetect-lst-modules.alias
75 install -D -m 644 oui.txt usb.ids pci.ids $(prefix)/share
76 mkdir -p $(prefix)/share/misc
77 install -D -m 644 pnp.ids $(prefix)/share/misc

Properties

Name Value
svn:eol-style native

  ViewVC Help
Powered by ViewVC 1.1.30