makefile: switch to BSD/GNU make
Let's stop using POSIX make, it's too much of a pain.
This commit is contained in:
parent
f858ec163c
commit
66a83e6345
21
Makefile
21
Makefile
@ -1,13 +1,10 @@
|
|||||||
.POSIX:
|
GO ?= go
|
||||||
.SUFFIXES:
|
RM ?= rm
|
||||||
|
SCDOC ?= scdoc
|
||||||
GO = go
|
GOFLAGS ?=
|
||||||
RM = rm
|
PREFIX ?= /usr/local
|
||||||
SCDOC = scdoc
|
BINDIR ?= bin
|
||||||
GOFLAGS =
|
MANDIR ?= share/man
|
||||||
PREFIX = /usr/local
|
|
||||||
BINDIR = bin
|
|
||||||
MANDIR = share/man
|
|
||||||
|
|
||||||
all: soju sojuctl doc/soju.1
|
all: soju sojuctl doc/soju.1
|
||||||
|
|
||||||
@ -19,7 +16,7 @@ doc/soju.1: doc/soju.1.scd
|
|||||||
$(SCDOC) <doc/soju.1.scd >doc/soju.1
|
$(SCDOC) <doc/soju.1.scd >doc/soju.1
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) -rf soju sojuctl doc/soju.1
|
$(RM) -f soju sojuctl doc/soju.1
|
||||||
install:
|
install:
|
||||||
mkdir -p $(DESTDIR)$(PREFIX)/$(BINDIR)
|
mkdir -p $(DESTDIR)$(PREFIX)/$(BINDIR)
|
||||||
mkdir -p $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
|
mkdir -p $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
|
||||||
@ -29,4 +26,4 @@ install:
|
|||||||
cp -f doc/soju.1 $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
|
cp -f doc/soju.1 $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
|
||||||
[ -f $(DESTDIR)/etc/soju/config ] || cp -f config.in $(DESTDIR)/etc/soju/config
|
[ -f $(DESTDIR)/etc/soju/config ] || cp -f config.in $(DESTDIR)/etc/soju/config
|
||||||
|
|
||||||
.PHONY: soju sojuctl
|
.PHONY: soju sojuctl clean install
|
||||||
|
@ -20,6 +20,7 @@ A user-friendly IRC bouncer.
|
|||||||
Dependencies:
|
Dependencies:
|
||||||
|
|
||||||
- Go
|
- Go
|
||||||
|
- BSD or GNU make
|
||||||
- a C89 compiler (for SQLite)
|
- a C89 compiler (for SQLite)
|
||||||
- scdoc (optional, for man pages)
|
- scdoc (optional, for man pages)
|
||||||
|
|
||||||
@ -30,7 +31,7 @@ For end users, a `Makefile` is provided:
|
|||||||
|
|
||||||
For development, you can use `go run ./cmd/soju` as usual.
|
For development, you can use `go run ./cmd/soju` as usual.
|
||||||
|
|
||||||
To link with the system libsqlite3, use `make GOFLAGS="-tags=libsqlite3"`.
|
To link with the system libsqlite3, set `GOFLAGS="-tags=libsqlite3"`.
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user