summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-02-19 00:30:06 +0100
committerMattias Andrée <maandree@operamail.com>2014-02-19 00:30:06 +0100
commit3683d5fa9188f6eacc7b1d41e2fc0c6c9f4ef629 (patch)
treead4b7347d4d58702f9a05bee9e8319c4ec0ed6f1
parentcomperhensive_example => comperhensive (diff)
downloadblueshift-3683d5fa9188f6eacc7b1d41e2fc0c6c9f4ef629.tar.gz
blueshift-3683d5fa9188f6eacc7b1d41e2fc0c6c9f4ef629.tar.bz2
blueshift-3683d5fa9188f6eacc7b1d41e2fc0c6c9f4ef629.tar.xz
add examples to makefile
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 4c020de..cc4addb 100644
--- a/Makefile
+++ b/Makefile
@@ -11,6 +11,7 @@ DATA ?= /share
BINDIR ?= $(PREFIX)$(BIN)
LIBDIR ?= $(PREFIX)$(LIB)
DATADIR ?= $(PREFIX)$(DATA)
+DOCDIR ?= $(DATADIR)/doc
LICENSEDIR ?= $(DATADIR)/licenses
SHEBANG ?= /usr/bin/python3
@@ -27,6 +28,7 @@ FLAGS = $$($(PKGCONFIG) --cflags --libs $(LIBS)) -std=$(STD) $(WARN) $(OPTIMISE)
DATAFILES = 2deg 10deg redshift redshift_old
PYFILES = __main__.py colour.py curve.py monitor.py solar.py
+EXAMPLES = comperhensive
@@ -71,7 +73,7 @@ obj/blueshift_randr.c: src/blueshift_randr.pyx
.PHONY: install
-install: install-command install-license
+install: install-command install-examples install-license
.PHONY: install-command
install-command: bin/blueshift_randr.so bin/blueshift
@@ -82,6 +84,11 @@ install-command: bin/blueshift_randr.so bin/blueshift
install -dm755 -- "$(DESTDIR)$(DATADIR)/$(PKGNAME)"
install -m644 -- $(DATAFILES) "$(DESTDIR)$(DATADIR)/$(PKGNAME)"
+.PHONY: install-examples
+install-examples:
+ install -dm755 -- "$(DESTDIR)$(DOCDIR)/$(PKGNAME)/examples"
+ install -m644 $(foreach E,$(EXAMPLES),examples/$(E)) -- "$(DESTDIR)$(DOCDIR)/$(PKGNAME)/examples"
+
.PHONY: install-license
install-license:
install -dm755 -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)"
@@ -92,6 +99,8 @@ install-license:
uninstall:
-rm -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)/COPYING"
-rm -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)/LICENSE"
+ -rm -- $(foreach E,$(EXAMPLES),"$(DESTDIR)$(DOCDIR)/$(PKGNAME)/examples/$(E)")
+ -rmdir -- "$(DESTDIR)$(DOCDIR)/$(PKGNAME)/examples"
-rmdir -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)"
-rm -- $(foreach F,$(DATAFILES),"$(DESTDIR)$(DATADIR)/$(PKGNAME)/$(F)")
-rmdir -- "$(DESTDIR)$(DATADIR)/$(PKGNAME)"