diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-02-19 10:26:09 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-02-19 10:26:09 +0100 |
commit | efa2a00e4ceb0a9ead4789b33fdb761dda9f7ed2 (patch) | |
tree | b6d057dc0022ecd37986a05b91793ff805b271ec | |
parent | update todo list (diff) | |
download | blueshift-efa2a00e4ceb0a9ead4789b33fdb761dda9f7ed2.tar.gz blueshift-efa2a00e4ceb0a9ead4789b33fdb761dda9f7ed2.tar.bz2 blueshift-efa2a00e4ceb0a9ead4789b33fdb761dda9f7ed2.tar.xz |
update makefile
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | Makefile | 48 |
1 files changed, 38 insertions, 10 deletions
@@ -13,6 +13,7 @@ LIBDIR ?= $(PREFIX)$(LIB) DATADIR ?= $(PREFIX)$(DATA) DOCDIR ?= $(DATADIR)/doc LICENSEDIR ?= $(DATADIR)/licenses +INFODIR ?= $(INFODIR)/info SHEBANG ?= /usr/bin/python3 COMMAND ?= blueshift @@ -31,9 +32,17 @@ PYFILES = __main__.py colour.py curve.py monitor.py solar.py EXAMPLES = comprehensive +.PHONY: default +default: command info .PHONY: all -all: command +all: command doc + +.PHONY: doc +doc: info + +.PHONY: info +info: blueshift.info .PHONY: command command: bin/blueshift_randr.so bin/blueshift @@ -72,8 +81,18 @@ obj/blueshift_randr.c: src/blueshift_randr.pyx mv src/blueshift_randr.c $@ +%.info: info/%.texinfo + makeinfo "$<" + + .PHONY: install -install: install-command install-examples install-license +install: install-base install-info install-examples + +.PHONY: install +install: install-base install-doc + +.PHONY: install-base +install-base: install-command install-license .PHONY: install-command install-command: bin/blueshift_randr.so bin/blueshift $(foreach D,$(DATAFILES),res/$(D)) @@ -84,28 +103,37 @@ install-command: bin/blueshift_randr.so bin/blueshift $(foreach D,$(DATAFILES),r install -dm755 -- "$(DESTDIR)$(DATADIR)/$(PKGNAME)" install -m644 -- $(foreach D,$(DATAFILES),res/$(D)) "$(DESTDIR)$(DATADIR)/$(PKGNAME)" +.PHONY: install-license +install-license: + install -dm755 -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)" + install -m644 COPYING LICENSE -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)" + +.PHONY: install-doc +install-doc: install-info install-examples + .PHONY: install-examples install-examples: $(foreach E,$(EXAMPLES),examples/$(E)) install -dm755 -- "$(DESTDIR)$(DOCDIR)/$(PKGNAME)/examples" install -m644 $^ -- "$(DESTDIR)$(DOCDIR)/$(PKGNAME)/examples" -.PHONY: install-license -install-license: - install -dm755 -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)" - install -m644 COPYING LICENSE -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)" +.PHONY: install-info +install-info: blueshift.info + install -dm755 -- "$(DESTDIR)$(INFODIR)" + install -m644 $< -- "$(DESTDIR)$(INFODIR)/$(PKGNAME).info" .PHONY: uninstall uninstall: + -rm --"$(DESTDIR)$(BINDIR)/$(COMMAND)" + -rm --"$(DESTDIR)$(LIBDIR)/blueshift_randr.so" -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)" - -rm --"$(DESTDIR)$(LIBDIR)/blueshift_randr.so" - -rm --"$(DESTDIR)$(BINDIR)/$(COMMAND)" + -rm -- $(foreach E,$(EXAMPLES),"$(DESTDIR)$(DOCDIR)/$(PKGNAME)/examples/$(E)") + -rmdir -- "$(DESTDIR)$(DOCDIR)/$(PKGNAME)/examples" + -rm -- "$(DESTDIR)$(INFODIR)/$(PKGNAME).info" .PHONY: all |