From 56feb746efbbbd4303a8257fad6ac8dda31d563d Mon Sep 17 00:00:00 2001 From: ge Date: Mon, 13 Feb 2023 23:10:44 +0300 Subject: [PATCH] Upd --- .gitignore | 3 +-- Makefile | 16 +++++++++++----- hr.nimble | 1 + 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index dc175b2..567609b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -hr -hr.1.gz +build/ diff --git a/Makefile b/Makefile index 9791a7a..c05ccef 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,15 @@ -PREFIX := "$$HOME/.local" +PREFIX ?= /usr/local +SRCDIR = src +BUILDDIR = build all: - nimble build - rst2man src/hr.1.rst | gzip -9 -c > hr.1.gz + nimble build -d:release + gzip -9ck $(SRCDIR)/hr.1 > $(BUILDDIR)/hr.1.gz install: - install -D hr $(PREFIX)/bin/hr - install -D hr.1.gz $(PREFIX)/share/man/man1/hr.1.gz + install -Dm755 $(BUILDDIR)/hr $(PREFIX)/bin/hr + install -Dm644 $(BUILDDIR)/hr.1.gz $(PREFIX)/share/man/man1/hr.1.gz + +uninstall: + rm -v $(PREFIX)/bin/hr + rm -v $(PREFIX)/share/man/man1/hr.1.gz diff --git a/hr.nimble b/hr.nimble index 6887221..cfce3fa 100644 --- a/hr.nimble +++ b/hr.nimble @@ -5,6 +5,7 @@ author = "ge" description = "A horizontal ruler for your terminal" license = "Unlicense" srcDir = "src" +binDir = "build" bin = @["hr"]