-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (25 loc) · 804 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
.SUFFIXES:
SHELL = /bin/sh
HELP2MAN := help2man
PREFIX := /usr/local
# Common prefix for installation directories.
prefix := ${PREFIX}
exec_prefix := $(prefix)
bindir := $(exec_prefix)/bin
datarootdir := $(prefix)/share
mandir := $(datarootdir)/man
man1dir := $(mandir)/man1
# Generate manpage from `--help` command
powertop-to-tmpfile.1: powertop-to-tmpfile
$(HELP2MAN) --no-info --help-option='--help man' --output=$@ $(abspath $<)
.PHONY: install
install: powertop-to-tmpfile powertop-to-tmpfile.1
install -Dm755 -t $(DESTDIR)$(bindir) powertop-to-tmpfile
install -Dm644 -t $(DESTDIR)$(man1dir) powertop-to-tmpfile.1
.PHONY: uninstall
uninstall:
-rm $(DESTDIR)$(bindir)/powertop-to-tmpfile
-rm $(DESTDIR)$(man1dir)/powertop-to-tmpfile.1
.PHONY: clean
clean:
-rm powertop-to-tmpfile.1