~taiite/public-inbox

senpai: Add Makefile v1 APPLIED

Marten Ringwelski: 1
 Add Makefile

 1 files changed, 33 insertions(+), 0 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~taiite/public-inbox/patches/21227/mbox | git am -3
Learn more about email & git

[PATCH senpai] Add Makefile Export this patch

---
This adds a simple Makefile to ease compilation and installation.

 Makefile | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 Makefile

diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..8cc57e5
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,33 @@
.POSIX:
.SUFFIXES:

GO = go
RM = rm
SCDOC = scdoc
GOFLAGS =
PREFIX = /usr/local
BINDIR = bin
MANDIR = share/man

all: senpai doc/senpai.1 doc/senpai.5

senpai:
	$(GO) build $(GOFLAGS) ./cmd/senpai
doc/senpai.1: doc/senpai.1.scd
	$(SCDOC) < doc/senpai.1.scd > doc/senpai.1
doc/senpai.5: doc/senpai.5.scd
	$(SCDOC) < doc/senpai.5.scd > doc/senpai.5

clean:
	$(RM) -rf senpai doc/senpai.1 doc/senpai.5
install: all
	mkdir -p $(DESTDIR)$(PREFIX)/$(BINDIR)
	mkdir -p $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
	mkdir -p $(DESTDIR)$(PREFIX)/$(MANDIR)/man5
	cp -f senpai $(DESTDIR)$(PREFIX)/$(BINDIR)
	cp -f doc/senpai.1 $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
	cp -f doc/senpai.5 $(DESTDIR)$(PREFIX)/$(MANDIR)/man5
uninstall:
	$(RM) $(DESTDIR)$(PREFIX)/$(BINDIR)/senpai
	$(RM) $(DESTDIR)$(PREFIX)/$(MANDIR)/man1/senpai.1
	$(RM) $(DESTDIR)$(PREFIX)/$(MANDIR)/man5/senpai.5
-- 
2.30.2
Thank you very much! applied here:

https://git.sr.ht/~taiite/senpai/commit/47bf3860df0c38e77a3866586d628a0480d7d946