Last change
on this file since 784 was 775, checked in by contact, 3 years ago |
makefile: switch to BSD/GNU make
Let's stop using POSIX make, it's too much of a pain.
|
File size:
703 bytes
|
Line | |
---|
1 | GO ?= go
|
---|
2 | RM ?= rm
|
---|
3 | SCDOC ?= scdoc
|
---|
4 | GOFLAGS ?=
|
---|
5 | PREFIX ?= /usr/local
|
---|
6 | BINDIR ?= bin
|
---|
7 | MANDIR ?= share/man
|
---|
8 |
|
---|
9 | all: soju sojuctl doc/soju.1
|
---|
10 |
|
---|
11 | soju:
|
---|
12 | $(GO) build $(GOFLAGS) ./cmd/soju
|
---|
13 | sojuctl:
|
---|
14 | $(GO) build $(GOFLAGS) ./cmd/sojuctl
|
---|
15 | doc/soju.1: doc/soju.1.scd
|
---|
16 | $(SCDOC) <doc/soju.1.scd >doc/soju.1
|
---|
17 |
|
---|
18 | clean:
|
---|
19 | $(RM) -f soju sojuctl doc/soju.1
|
---|
20 | install:
|
---|
21 | mkdir -p $(DESTDIR)$(PREFIX)/$(BINDIR)
|
---|
22 | mkdir -p $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
|
---|
23 | mkdir -p $(DESTDIR)/etc/soju
|
---|
24 | mkdir -p $(DESTDIR)/var/lib/soju
|
---|
25 | cp -f soju sojuctl $(DESTDIR)$(PREFIX)/$(BINDIR)
|
---|
26 | cp -f doc/soju.1 $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
|
---|
27 | [ -f $(DESTDIR)/etc/soju/config ] || cp -f config.in $(DESTDIR)/etc/soju/config
|
---|
28 |
|
---|
29 | .PHONY: soju sojuctl clean install
|
---|
Note:
See
TracBrowser
for help on using the repository browser.