]>
Commit | Line | Data |
---|---|---|
b2441318 | 1 | # SPDX-License-Identifier: GPL-2.0 |
22440373 TB |
2 | PREFIX ?= /usr |
3 | DESTDIR ?= | |
4 | ||
5 | all: | |
6 | @echo "Nothing to build" | |
7 | ||
2158e724 | 8 | install : uninstall |
22440373 | 9 | install -d $(DESTDIR)$(PREFIX)/lib/pm-graph |
a6fbdbb2 TB |
10 | install sleepgraph.py $(DESTDIR)$(PREFIX)/lib/pm-graph |
11 | install bootgraph.py $(DESTDIR)$(PREFIX)/lib/pm-graph | |
12 | install -d $(DESTDIR)$(PREFIX)/lib/pm-graph/config | |
13 | install -m 644 config/cgskip.txt $(DESTDIR)$(PREFIX)/lib/pm-graph/config | |
14 | install -m 644 config/freeze-callgraph.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config | |
15 | install -m 644 config/freeze.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config | |
16 | install -m 644 config/freeze-dev.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config | |
17 | install -m 644 config/standby-callgraph.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config | |
18 | install -m 644 config/standby.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config | |
19 | install -m 644 config/standby-dev.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config | |
20 | install -m 644 config/suspend-callgraph.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config | |
21 | install -m 644 config/suspend.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config | |
22 | install -m 644 config/suspend-dev.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config | |
23 | install -m 644 config/suspend-x2-proc.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config | |
22440373 | 24 | |
a6fbdbb2 | 25 | install -d $(DESTDIR)$(PREFIX)/bin |
5484f033 TB |
26 | ln -s ../lib/pm-graph/bootgraph.py $(DESTDIR)$(PREFIX)/bin/bootgraph |
27 | ln -s ../lib/pm-graph/sleepgraph.py $(DESTDIR)$(PREFIX)/bin/sleepgraph | |
22440373 TB |
28 | |
29 | install -d $(DESTDIR)$(PREFIX)/share/man/man8 | |
30 | install bootgraph.8 $(DESTDIR)$(PREFIX)/share/man/man8 | |
31 | install sleepgraph.8 $(DESTDIR)$(PREFIX)/share/man/man8 | |
32 | ||
33 | uninstall : | |
2158e724 TB |
34 | rm -f $(DESTDIR)$(PREFIX)/share/man/man8/bootgraph.8 |
35 | rm -f $(DESTDIR)$(PREFIX)/share/man/man8/sleepgraph.8 | |
22440373 | 36 | |
2158e724 TB |
37 | rm -f $(DESTDIR)$(PREFIX)/bin/bootgraph |
38 | rm -f $(DESTDIR)$(PREFIX)/bin/sleepgraph | |
22440373 | 39 | |
a6fbdbb2 TB |
40 | rm -f $(DESTDIR)$(PREFIX)/lib/pm-graph/config/* |
41 | if [ -d $(DESTDIR)$(PREFIX)/lib/pm-graph/config ] ; then \ | |
42 | rmdir $(DESTDIR)$(PREFIX)/lib/pm-graph/config; \ | |
43 | fi; | |
2c9a583b TB |
44 | rm -f $(DESTDIR)$(PREFIX)/lib/pm-graph/__pycache__/* |
45 | if [ -d $(DESTDIR)$(PREFIX)/lib/pm-graph/__pycache__ ] ; then \ | |
46 | rmdir $(DESTDIR)$(PREFIX)/lib/pm-graph/__pycache__; \ | |
47 | fi; | |
a6fbdbb2 | 48 | rm -f $(DESTDIR)$(PREFIX)/lib/pm-graph/* |
2158e724 TB |
49 | if [ -d $(DESTDIR)$(PREFIX)/lib/pm-graph ] ; then \ |
50 | rmdir $(DESTDIR)$(PREFIX)/lib/pm-graph; \ | |
51 | fi; |