aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-11-27 05:31:51 +0100
committerMattias Andrée <maandree@operamail.com>2015-11-27 05:31:51 +0100
commitf8c13b0571b4d2fe2183c2c9894fd4991cf6a96a (patch)
tree7528d9dd3d017709b38d2fc99b7aac4ad3c1dd75 /Makefile
parentedit makefile variables (diff)
downloadxpybar-f8c13b0571b4d2fe2183c2c9894fd4991cf6a96a.tar.gz
xpybar-f8c13b0571b4d2fe2183c2c9894fd4991cf6a96a.tar.bz2
xpybar-f8c13b0571b4d2fe2183c2c9894fd4991cf6a96a.tar.xz
add makefile
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 15 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 6038511..b985c80 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,8 @@ EXAMPLE = /share
BINDIR = $(PREFIX)$(BIN)
DATADIR = $(PREFIX)$(DATA)
EXAMPLEDIR = $(PREFIX)$(EXAMPLE)
+MANDIR = $(DATADIR)/man
+MAN1DIR = $(MANDIR)/man1
LICENSEDIR = $(DATADIR)/licenses
PY3_SHEBANG = "/usr/bin/env python3"
@@ -73,7 +75,10 @@ obj/%.o: src/%.c
.PHONY: install
-install: install-base
+install: install-base install-doc
+
+.PHONY: install-all
+install-all: install-base install-man
.PHONY: install-base
install-base: install-command install-license install-all-examples install-plugins
@@ -112,6 +117,14 @@ install-plugins: $(foreach F,$(PLUGINS),src/plugins/$(F).py)
install -dm755 -- "$(DESTDIR)$(EXAMPLEDIR)/$(PKGNAME)/plugins"
install -m644 $^ -- "$(DESTDIR)$(EXAMPLEDIR)/$(PKGNAME)/plugins"
+.PHONY: install-doc
+install-doc: install-man
+
+.PHONY: install-man
+install-man: doc/man/xpybar.1
+ install -dm755 -- "$(DESTDIR)$(MAN1DIR)"
+ install -m644 $< -- "$(DESTDIR)$(MAN1DIR)/$(COMMAND).1"
+
.PHONY: uninstall
@@ -132,6 +145,7 @@ uninstall:
-rm -- $(foreach F,$(PLUGINS),"$(DESTDIR)$(DATADIR)/$(PKGNAME)/plugins/$(F)")
-rmdir -- "$(DESTDIR)$(DATADIR)/$(PKGNAME)/plugins"
-rmdir -- "$(DESTDIR)$(DATADIR)/$(PKGNAME)"
+ -rm -- "$(DESTDIR)$(MAN1DIR)/$(COMMAND).1"