1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0 222440373STodd E BrandtPREFIX ?= /usr 322440373STodd E BrandtDESTDIR ?= 422440373STodd E Brandt 522440373STodd E Brandtall: 622440373STodd E Brandt @echo "Nothing to build" 722440373STodd E Brandt 82158e724STodd E Brandtinstall : uninstall 922440373STodd E Brandt install -d $(DESTDIR)$(PREFIX)/lib/pm-graph 10a6fbdbb2STodd E Brandt install sleepgraph.py $(DESTDIR)$(PREFIX)/lib/pm-graph 11a6fbdbb2STodd E Brandt install bootgraph.py $(DESTDIR)$(PREFIX)/lib/pm-graph 12a6fbdbb2STodd E Brandt install -d $(DESTDIR)$(PREFIX)/lib/pm-graph/config 13a6fbdbb2STodd E Brandt install -m 644 config/cgskip.txt $(DESTDIR)$(PREFIX)/lib/pm-graph/config 14a6fbdbb2STodd E Brandt install -m 644 config/freeze-callgraph.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config 15a6fbdbb2STodd E Brandt install -m 644 config/freeze.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config 16a6fbdbb2STodd E Brandt install -m 644 config/freeze-dev.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config 17a6fbdbb2STodd E Brandt install -m 644 config/standby-callgraph.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config 18a6fbdbb2STodd E Brandt install -m 644 config/standby.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config 19a6fbdbb2STodd E Brandt install -m 644 config/standby-dev.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config 20a6fbdbb2STodd E Brandt install -m 644 config/suspend-callgraph.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config 21a6fbdbb2STodd E Brandt install -m 644 config/suspend.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config 22a6fbdbb2STodd E Brandt install -m 644 config/suspend-dev.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config 23a6fbdbb2STodd E Brandt install -m 644 config/suspend-x2-proc.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config 2422440373STodd E Brandt 25a6fbdbb2STodd E Brandt install -d $(DESTDIR)$(PREFIX)/bin 265484f033STodd Brandt ln -s ../lib/pm-graph/bootgraph.py $(DESTDIR)$(PREFIX)/bin/bootgraph 275484f033STodd Brandt ln -s ../lib/pm-graph/sleepgraph.py $(DESTDIR)$(PREFIX)/bin/sleepgraph 2822440373STodd E Brandt 2922440373STodd E Brandt install -d $(DESTDIR)$(PREFIX)/share/man/man8 3022440373STodd E Brandt install bootgraph.8 $(DESTDIR)$(PREFIX)/share/man/man8 3122440373STodd E Brandt install sleepgraph.8 $(DESTDIR)$(PREFIX)/share/man/man8 3222440373STodd E Brandt 3322440373STodd E Brandtuninstall : 342158e724STodd E Brandt rm -f $(DESTDIR)$(PREFIX)/share/man/man8/bootgraph.8 352158e724STodd E Brandt rm -f $(DESTDIR)$(PREFIX)/share/man/man8/sleepgraph.8 3622440373STodd E Brandt 372158e724STodd E Brandt rm -f $(DESTDIR)$(PREFIX)/bin/bootgraph 382158e724STodd E Brandt rm -f $(DESTDIR)$(PREFIX)/bin/sleepgraph 3922440373STodd E Brandt 40a6fbdbb2STodd E Brandt rm -f $(DESTDIR)$(PREFIX)/lib/pm-graph/config/* 41a6fbdbb2STodd E Brandt if [ -d $(DESTDIR)$(PREFIX)/lib/pm-graph/config ] ; then \ 42a6fbdbb2STodd E Brandt rmdir $(DESTDIR)$(PREFIX)/lib/pm-graph/config; \ 43a6fbdbb2STodd E Brandt fi; 44*2c9a583bSTodd Brandt rm -f $(DESTDIR)$(PREFIX)/lib/pm-graph/__pycache__/* 45*2c9a583bSTodd Brandt if [ -d $(DESTDIR)$(PREFIX)/lib/pm-graph/__pycache__ ] ; then \ 46*2c9a583bSTodd Brandt rmdir $(DESTDIR)$(PREFIX)/lib/pm-graph/__pycache__; \ 47*2c9a583bSTodd Brandt fi; 48a6fbdbb2STodd E Brandt rm -f $(DESTDIR)$(PREFIX)/lib/pm-graph/* 492158e724STodd E Brandt if [ -d $(DESTDIR)$(PREFIX)/lib/pm-graph ] ; then \ 502158e724STodd E Brandt rmdir $(DESTDIR)$(PREFIX)/lib/pm-graph; \ 512158e724STodd E Brandt fi; 52