Last change
on this file since 790 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
|
Rev | Line | |
---|
[775] | 1 | GO ?= go
|
---|
| 2 | RM ?= rm
|
---|
| 3 | SCDOC ?= scdoc
|
---|
| 4 | GOFLAGS ?=
|
---|
| 5 | PREFIX ?= /usr/local
|
---|
| 6 | BINDIR ?= bin
|
---|
| 7 | MANDIR ?= share/man
|
---|
[126] | 8 |
|
---|
[169] | 9 | all: soju sojuctl doc/soju.1
|
---|
[126] | 10 |
|
---|
| 11 | soju:
|
---|
| 12 | $(GO) build $(GOFLAGS) ./cmd/soju
|
---|
| 13 | sojuctl:
|
---|
| 14 | $(GO) build $(GOFLAGS) ./cmd/sojuctl
|
---|
[169] | 15 | doc/soju.1: doc/soju.1.scd
|
---|
| 16 | $(SCDOC) <doc/soju.1.scd >doc/soju.1
|
---|
[126] | 17 |
|
---|
| 18 | clean:
|
---|
[775] | 19 | $(RM) -f soju sojuctl doc/soju.1
|
---|
[530] | 20 | install:
|
---|
[126] | 21 | mkdir -p $(DESTDIR)$(PREFIX)/$(BINDIR)
|
---|
| 22 | mkdir -p $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
|
---|
[506] | 23 | mkdir -p $(DESTDIR)/etc/soju
|
---|
| 24 | mkdir -p $(DESTDIR)/var/lib/soju
|
---|
[126] | 25 | cp -f soju sojuctl $(DESTDIR)$(PREFIX)/$(BINDIR)
|
---|
[169] | 26 | cp -f doc/soju.1 $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
|
---|
[613] | 27 | [ -f $(DESTDIR)/etc/soju/config ] || cp -f config.in $(DESTDIR)/etc/soju/config
|
---|
[510] | 28 |
|
---|
[775] | 29 | .PHONY: soju sojuctl clean install
|
---|
Note:
See
TracBrowser
for help on using the repository browser.