~gpanders/ijq

ref: fbf6a3d4a2e679f900183de053dfee0ff7bd2593 ijq/Makefile -rw-r--r-- 696 bytes
fbf6a3d4Gregory Anders Surround keys containing special characters in quotes 4 months ago
                                                                                
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
prefix = /usr/local
bindir = $(prefix)/bin
mandir = $(prefix)/share/man

SRCS = main.go

VERSION = 0.3.5

.PHONY: all
all: ijq docs

.PHONY: docs
docs: ijq.1

ijq: $(SRCS)
	go build -ldflags="-s -w -X main.Version=$(VERSION)" -o $@

%.1: %.1.scd
	scdoc < $< > $@

.PHONY: test
test:
	go test -v -coverprofile=./cover.out .

.PHONY: viewcover
viewcover:
	go tool cover -html=./cover.out

.PHONY: install
install: ijq ijq.1
	install -d $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1
	install -m 0755 ijq $(DESTDIR)$(bindir)
	install -m 0644 ijq.1 $(DESTDIR)$(mandir)/man1

.PHONY: uninstall
uninstall:
	rm $(DESTDIR)$(bindir)/ijq $(DESTDIR)$(mandir)/man1/ijq.1

.PHONY: clean
clean:
	rm -f ijq ijq.1