File: Makefile

package info (click to toggle)
shotman 0.4.10-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 260 kB
  • sloc: makefile: 47
file content (41 lines) | stat: -rw-r--r-- 1,299 bytes parent folder | download | duplicates (2)
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
32
33
34
35
36
37
38
39
40
41
DESTDIR?=/
PREFIX?=/usr/local

all: build

shotman.1: shotman.1.scd
	scdoc < shotman.1.scd > shotman.1

index.html: shotman.1
	mandoc -T html -O style=man-style.css < shotman.1 > index.html

site.tar.gz: index.html
	#TODO: curl man-style
	tar -cvz index.html man-style.css > site.tar.gz

target/release/shotman:
	cargo build --release --frozen

_shotman.zsh: target/release/shotman
	./target/release/shotman_completions zsh > _shotman.zsh

shotman.bash: target/release/shotman
	./target/release/shotman_completions bash > shotman.bash

shotman.fish: target/release/shotman
	./target/release/shotman_completions fish > shotman.fish

.PHONY: completion
completion: _shotman.zsh shotman.bash shotman.fish

.PHONY: build
build: target/release/shotman shotman.1 completion

.PHONY: install
install: build
	@install -Dm755 target/release/shotman 	${DESTDIR}${PREFIX}/bin/shotman
	@install -Dm644 shotman.1	${DESTDIR}${PREFIX}/share/man/man1/shotman.1
	@install -Dm644 LICENCE.md 	${DESTDIR}${PREFIX}/share/licenses/shotman/LICENCE.md
	@install -Dm644 _shotman.zsh ${DESTDIR}${PREFIX}/share/zsh/site-functions/_shotman
	@install -Dm644 shotman.bash ${DESTDIR}${PREFIX}/share/bash-completion/completions/shotman
	@install -Dm644 shotman.fish ${DESTDIR}${PREFIX}/share/fish/vendor_completions.d/shotman.fish