mk: be compatible with bsd make
ifeq is not supported by bsd make. We don't need this. Use a simple shell command. Signed-off-by: Robin Jarry <robin@jarry.cc>
This commit is contained in:
parent
34d36bad0d
commit
e97e0d8ab1
1 changed files with 17 additions and 25 deletions
42
Makefile
42
Makefile
|
@ -2,13 +2,7 @@
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .1 .5 .7 .1.scd .5.scd .7.scd
|
.SUFFIXES: .1 .5 .7 .1.scd .5.scd .7.scd
|
||||||
|
|
||||||
_git_version=$(shell git describe --long --tags --dirty 2>/dev/null | sed 's/-/.r/;s/-/./')
|
VERSION?=`git describe --long --tags --dirty 2>/dev/null || echo 0.7.1`
|
||||||
ifeq ($(strip $(_git_version)),)
|
|
||||||
VERSION=0.7.1
|
|
||||||
else
|
|
||||||
VERSION=$(_git_version)
|
|
||||||
endif
|
|
||||||
|
|
||||||
VPATH=doc
|
VPATH=doc
|
||||||
PREFIX?=/usr/local
|
PREFIX?=/usr/local
|
||||||
BINDIR?=$(PREFIX)/bin
|
BINDIR?=$(PREFIX)/bin
|
||||||
|
@ -20,6 +14,21 @@ GOFLAGS?=
|
||||||
GOSRC:=$(shell find * -name '*.go')
|
GOSRC:=$(shell find * -name '*.go')
|
||||||
GOSRC+=go.mod go.sum
|
GOSRC+=go.mod go.sum
|
||||||
|
|
||||||
|
DOCS := \
|
||||||
|
aerc.1 \
|
||||||
|
aerc-search.1 \
|
||||||
|
aerc-config.5 \
|
||||||
|
aerc-imap.5 \
|
||||||
|
aerc-maildir.5 \
|
||||||
|
aerc-sendmail.5 \
|
||||||
|
aerc-notmuch.5 \
|
||||||
|
aerc-smtp.5 \
|
||||||
|
aerc-tutorial.7 \
|
||||||
|
aerc-templates.7 \
|
||||||
|
aerc-stylesets.7
|
||||||
|
|
||||||
|
all: aerc aerc.conf $(DOCS)
|
||||||
|
|
||||||
aerc: $(GOSRC)
|
aerc: $(GOSRC)
|
||||||
$(GO) build $(GOFLAGS) \
|
$(GO) build $(GOFLAGS) \
|
||||||
-ldflags "-X main.Prefix=$(PREFIX) \
|
-ldflags "-X main.Prefix=$(PREFIX) \
|
||||||
|
@ -46,19 +55,6 @@ debug: $(GOSRC)
|
||||||
GOFLAGS="-tags=notmuch" \
|
GOFLAGS="-tags=notmuch" \
|
||||||
dlv debug --headless --listen localhost:4747 &>/dev/null
|
dlv debug --headless --listen localhost:4747 &>/dev/null
|
||||||
|
|
||||||
DOCS := \
|
|
||||||
aerc.1 \
|
|
||||||
aerc-search.1 \
|
|
||||||
aerc-config.5 \
|
|
||||||
aerc-imap.5 \
|
|
||||||
aerc-maildir.5 \
|
|
||||||
aerc-sendmail.5 \
|
|
||||||
aerc-notmuch.5 \
|
|
||||||
aerc-smtp.5 \
|
|
||||||
aerc-tutorial.7 \
|
|
||||||
aerc-templates.7 \
|
|
||||||
aerc-stylesets.7
|
|
||||||
|
|
||||||
.1.scd.1:
|
.1.scd.1:
|
||||||
scdoc < $< > $@
|
scdoc < $< > $@
|
||||||
|
|
||||||
|
@ -70,15 +66,13 @@ DOCS := \
|
||||||
|
|
||||||
doc: $(DOCS)
|
doc: $(DOCS)
|
||||||
|
|
||||||
all: aerc aerc.conf doc
|
|
||||||
|
|
||||||
# Exists in GNUMake but not in NetBSD make and others.
|
# Exists in GNUMake but not in NetBSD make and others.
|
||||||
RM?=rm -f
|
RM?=rm -f
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(DOCS) aerc.conf aerc
|
$(RM) $(DOCS) aerc.conf aerc
|
||||||
|
|
||||||
install: all
|
install: $(DOCS) aerc aerc.conf
|
||||||
mkdir -m755 -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1 $(DESTDIR)$(MANDIR)/man5 $(DESTDIR)$(MANDIR)/man7 \
|
mkdir -m755 -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1 $(DESTDIR)$(MANDIR)/man5 $(DESTDIR)$(MANDIR)/man7 \
|
||||||
$(DESTDIR)$(SHAREDIR) $(DESTDIR)$(SHAREDIR)/filters $(DESTDIR)$(SHAREDIR)/templates $(DESTDIR)$(SHAREDIR)/stylesets
|
$(DESTDIR)$(SHAREDIR) $(DESTDIR)$(SHAREDIR)/filters $(DESTDIR)$(SHAREDIR)/templates $(DESTDIR)$(SHAREDIR)/stylesets
|
||||||
install -m755 aerc $(DESTDIR)$(BINDIR)/aerc
|
install -m755 aerc $(DESTDIR)$(BINDIR)/aerc
|
||||||
|
@ -129,6 +123,4 @@ uninstall:
|
||||||
$(RMDIR_IF_EMPTY) $(DESTDIR)$(MANDIR)/man7
|
$(RMDIR_IF_EMPTY) $(DESTDIR)$(MANDIR)/man7
|
||||||
$(RMDIR_IF_EMPTY) $(DESTDIR)$(MANDIR)
|
$(RMDIR_IF_EMPTY) $(DESTDIR)$(MANDIR)
|
||||||
|
|
||||||
.DEFAULT_GOAL := all
|
|
||||||
|
|
||||||
.PHONY: all doc clean install uninstall debug
|
.PHONY: all doc clean install uninstall debug
|
||||||
|
|
Loading…
Reference in a new issue