suika/Makefile
hubert 06ce9f24b6 Don't build soju when calling "make install"
Otherwise soju would be rebuilt as the user who runs "make install"
(typically root).

git-svn-id: file:///srv/svn/repo/suika/trunk@530 f0ae65fe-ee39-954e-97ec-027ff2717ef4
2021-05-25 14:31:06 +00:00

33 lines
666 B
Makefile

.POSIX:
.SUFFIXES:
GO = go
RM = rm
SCDOC = scdoc
GOFLAGS =
PREFIX = /usr/local
BINDIR = bin
MANDIR = share/man
all: soju sojuctl doc/soju.1
soju:
$(GO) build $(GOFLAGS) ./cmd/soju
sojuctl:
$(GO) build $(GOFLAGS) ./cmd/sojuctl
doc/soju.1: doc/soju.1.scd
$(SCDOC) <doc/soju.1.scd >doc/soju.1
clean:
$(RM) -rf soju sojuctl doc/soju.1
install:
mkdir -p $(DESTDIR)$(PREFIX)/$(BINDIR)
mkdir -p $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
mkdir -p $(DESTDIR)/etc/soju
mkdir -p $(DESTDIR)/var/lib/soju
cp -f soju sojuctl $(DESTDIR)$(PREFIX)/$(BINDIR)
cp -f doc/soju.1 $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
cp -f config.in $(DESTDIR)/etc/soju/config
.PHONY: soju sojuctl