diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-05-22 12:35:44 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-05-22 12:35:44 -0400 |
commit | f42724caf3b374df0fa4eb170b3527cd20814eed (patch) | |
tree | 6efdb42ce0423e25c172382565a3c317b836737b /Makefile | |
parent | 80704f242206e56d4c07669a5ca42827c1d59b59 (diff) | |
download | aerc-f42724caf3b374df0fa4eb170b3527cd20814eed.tar.gz |
Install default configs to XDG config if not found
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/Makefile b/Makefile index 64ba7d1..5708845 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,15 @@ +PREFIX?=/usr/local +_INSTDIR=$(DESTDIR)$(PREFIX) +BINDIR?=$(_INSTDIR)/bin +SHAREDIR?=$(_INSTDIR)/share/aerc +MANDIR?=$(_INSTDIR)/share/man GOFLAGS?= aerc: - go build $(GOFLAGS) -o aerc + go build $(GOFLAGS) \ + -ldflags "-X main.Prefix=$(PREFIX)" \ + -ldflags "-X main.ShareDir=$(SHAREDIR)" \ + -o aerc %.1: doc/%.1.scd scdoc < $< > $@ @@ -19,17 +27,13 @@ DOCS := \ aerc-smtp.5 \ aerc-tutorial.7 -all: aerc $(DOCS) +doc: $(DOCS) + +all: aerc doc clean: rm -f *.1 *.5 aerc -PREFIX?=/usr/local -_INSTDIR=$(DESTDIR)$(PREFIX) -BINDIR?=$(_INSTDIR)/bin -SHAREDIR?=$(_INSTDIR)/share/aerc -MANDIR?=$(_INSTDIR)/share/man - install: all mkdir -p $(BINDIR) $(MANDIR)/man1 $(MANDIR)/man5 \ $(SHAREDIR) $(SHAREDIR)/filters @@ -47,4 +51,4 @@ install: all .DEFAULT_GOAL := all -.PHONY: aerc clean install +.PHONY: aerc all doc clean install |