~gjabell/mfn

ref: eadd6a87a7c825c733dcd197dd0297b10f0d5bd2 mfn/Makefile -rw-r--r-- 530 bytes
eadd6a87Galen Abell Remove Contributing from README 11 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
42
43
44
.POSIX:
.SUFFIXES:
.SUFFIXES: .1 .5 .1.scd .5.scd

VERSION=0.3.0

VPATH=doc
PREFIX?=/usr
_INSTDIR=$(DESTDIR)$(PREFIX)
BINDIR?=$(_INSTDIR)/bin
MANDIR?=$(_INSTDIR)/share/man
GO?=go
GOFLAGS?=

GOSRC!=find . -name '*.go'
GOSRC+=go.mod go.sum

mfn: $(GOSRC)
	$(GO) build $(GOFLAGS) \
		-ldflags "-X main.Version=$(VERSION)" \
		-o $@

DOCS := \
	mfn.1 \
	mfn-config.5

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

.5.scd.5:
	scdoc < $< > $@

doc: $(DOCS)

all: mfn doc

RM?=rm -f

clean:
	$(RM) $(DOCS) mfn

.DEFAULT_GOAL := all

.PHONY: all mfn clean