about summary refs log tree commit diff
path: root/Makefile
blob: e608a139f966372e6d702cb86297b18cfc396af1 (plain) (blame)
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
42
CARGO = cargo
INSTALL = install
INSTALL_PROGRAM = $(INSTALL)
MKDIR_P = mkdir -p

prefix = /usr/local
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin

all: release
.PHONY: all

cargo-deps: vendor/github_schema.graphql src/commit_pr.graphql
.PHONY: cargo-deps

target/release/pushmail: cargo-deps
	$(CARGO) build --release

target/debug/pushmail: cargo-deps
	$(CARGO) build

release: target/release/pushmail
.PHONY: release

debug: target/debug/pushmail
.PHONY: debug

check: cargo-deps
	$(CARGO) test
.PHONY: check

install-dirs:
	$(MKDIR_P) $(DESTDIR)$(bindir)
.PHONY: install-dirs

install: install-dirs
	$(INSTALL_PROGRAM) target/release/pushmail $(DESTDIR)$(bindir)/pushmail
.PHONY: install

uninstall:
	rm -f $(DESTDIR)$(bindir)/pushmail
.PHONY: uninstall