Debian Codegraph @

Makefile

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 PROG = usb-modeswitch-data
2 VERS = 20251207
3 MV = /bin/mv -f
4 PREFIX = $(DESTDIR)/usr
5 ETCDIR = $(DESTDIR)/etc
6 RULESDIR = $(DESTDIR)/lib/udev/rules.d
7
8
9 .PHONY: clean
10
11 all: 40-usb_modeswitch.rules
12
13 clean:
14 $(MV) 40-usb_modeswitch.rules 40-usb_modeswitch.rules.old
15
16 install: all files-install db-install
17
18 install-packed: files-install db-install-packed
19
20 files-install:
21 install -d $(PREFIX)/share/usb_modeswitch
22 install -d $(ETCDIR)/usb_modeswitch.d
23 install -D --mode=644 40-usb_modeswitch.rules $(RULESDIR)/40-usb_modeswitch.rules
24
25 40-usb_modeswitch.rules:
26 ./gen-rules.tcl
27
28 db-install: files-install
29 install --mode=644 -t $(PREFIX)/share/usb_modeswitch ./usb_modeswitch.d/*
30
31 db-install-packed:
32 @# Create a compressed tar without gzip timestamp, so tar.gz
33 @# differs only if content is different
34 cd ./usb_modeswitch.d; find * -print0 | LC_ALL=C sort -z | tar --no-recursion --null --files-from=- --mode=go=rX,u+rw,a-s -cf ../configPack.tar
35 gzip -f9n ./configPack.tar
36 install --mode=644 -t $(PREFIX)/share/usb_modeswitch ./configPack.tar.gz
37 rm -f ./configPack.tar.gz
38
39 uninstall: files-uninstall
40
41 files-uninstall:
42 $(RM) $(RULESDIR)/40-usb_modeswitch.rules
43 $(RM) -R $(PREFIX)/share/usb_modeswitch
44
45 .PHONY: clean install uninstall