162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 262306a36Sopenharmony_ciPREFIX ?= /usr 362306a36Sopenharmony_ciDESTDIR ?= 462306a36Sopenharmony_ci 562306a36Sopenharmony_ciall: 662306a36Sopenharmony_ci @echo "Nothing to build" 762306a36Sopenharmony_ci 862306a36Sopenharmony_ciinstall : uninstall 962306a36Sopenharmony_ci install -d $(DESTDIR)$(PREFIX)/lib/pm-graph 1062306a36Sopenharmony_ci install sleepgraph.py $(DESTDIR)$(PREFIX)/lib/pm-graph 1162306a36Sopenharmony_ci install bootgraph.py $(DESTDIR)$(PREFIX)/lib/pm-graph 1262306a36Sopenharmony_ci install -d $(DESTDIR)$(PREFIX)/lib/pm-graph/config 1362306a36Sopenharmony_ci install -m 644 config/cgskip.txt $(DESTDIR)$(PREFIX)/lib/pm-graph/config 1462306a36Sopenharmony_ci install -m 644 config/freeze-callgraph.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config 1562306a36Sopenharmony_ci install -m 644 config/freeze.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config 1662306a36Sopenharmony_ci install -m 644 config/freeze-dev.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config 1762306a36Sopenharmony_ci install -m 644 config/standby-callgraph.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config 1862306a36Sopenharmony_ci install -m 644 config/standby.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config 1962306a36Sopenharmony_ci install -m 644 config/standby-dev.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config 2062306a36Sopenharmony_ci install -m 644 config/suspend-callgraph.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config 2162306a36Sopenharmony_ci install -m 644 config/suspend.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config 2262306a36Sopenharmony_ci install -m 644 config/suspend-dev.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config 2362306a36Sopenharmony_ci install -m 644 config/suspend-x2-proc.cfg $(DESTDIR)$(PREFIX)/lib/pm-graph/config 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ci install -d $(DESTDIR)$(PREFIX)/bin 2662306a36Sopenharmony_ci ln -s ../lib/pm-graph/bootgraph.py $(DESTDIR)$(PREFIX)/bin/bootgraph 2762306a36Sopenharmony_ci ln -s ../lib/pm-graph/sleepgraph.py $(DESTDIR)$(PREFIX)/bin/sleepgraph 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ci install -d $(DESTDIR)$(PREFIX)/share/man/man8 3062306a36Sopenharmony_ci install bootgraph.8 $(DESTDIR)$(PREFIX)/share/man/man8 3162306a36Sopenharmony_ci install sleepgraph.8 $(DESTDIR)$(PREFIX)/share/man/man8 3262306a36Sopenharmony_ci 3362306a36Sopenharmony_ciuninstall : 3462306a36Sopenharmony_ci rm -f $(DESTDIR)$(PREFIX)/share/man/man8/bootgraph.8 3562306a36Sopenharmony_ci rm -f $(DESTDIR)$(PREFIX)/share/man/man8/sleepgraph.8 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ci rm -f $(DESTDIR)$(PREFIX)/bin/bootgraph 3862306a36Sopenharmony_ci rm -f $(DESTDIR)$(PREFIX)/bin/sleepgraph 3962306a36Sopenharmony_ci 4062306a36Sopenharmony_ci rm -f $(DESTDIR)$(PREFIX)/lib/pm-graph/config/* 4162306a36Sopenharmony_ci if [ -d $(DESTDIR)$(PREFIX)/lib/pm-graph/config ] ; then \ 4262306a36Sopenharmony_ci rmdir $(DESTDIR)$(PREFIX)/lib/pm-graph/config; \ 4362306a36Sopenharmony_ci fi; 4462306a36Sopenharmony_ci rm -f $(DESTDIR)$(PREFIX)/lib/pm-graph/__pycache__/* 4562306a36Sopenharmony_ci if [ -d $(DESTDIR)$(PREFIX)/lib/pm-graph/__pycache__ ] ; then \ 4662306a36Sopenharmony_ci rmdir $(DESTDIR)$(PREFIX)/lib/pm-graph/__pycache__; \ 4762306a36Sopenharmony_ci fi; 4862306a36Sopenharmony_ci rm -f $(DESTDIR)$(PREFIX)/lib/pm-graph/* 4962306a36Sopenharmony_ci if [ -d $(DESTDIR)$(PREFIX)/lib/pm-graph ] ; then \ 5062306a36Sopenharmony_ci rmdir $(DESTDIR)$(PREFIX)/lib/pm-graph; \ 5162306a36Sopenharmony_ci fi; 52