diff options
author | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2020-10-12 23:46:17 +0300 |
---|---|---|
committer | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2020-10-12 23:46:17 +0300 |
commit | 65a08f2ee361c5fd7da1a700154ea3f91997ea59 (patch) | |
tree | 9110b1c06fb40d05495f35e46c000246ded9ee70 | |
parent | ea6b166ea3de83365d0b56a4e0b4ccb5d4fd05da (diff) | |
download | finbudg-65a08f2ee361c5fd7da1a700154ea3f91997ea59.tar.gz finbudg-65a08f2ee361c5fd7da1a700154ea3f91997ea59.zip |
Added Makefile; Version bump
-rw-r--r-- | Cargo.lock | 2 | ||||
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | Makefile | 40 |
3 files changed, 42 insertions, 2 deletions
@@ -82,7 +82,7 @@ dependencies = [ [[package]] name = "finbudg" -version = "0.1.2" +version = "0.2.0" dependencies = [ "budget", "chrono", @@ -1,6 +1,6 @@ [package] name = "finbudg" -version = "0.1.2" +version = "0.2.0" edition = "2018" description = "Quick cli tool to calculate your expenses and balance for a set period of time." license = "MIT" diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..75f0afd --- /dev/null +++ b/Makefile @@ -0,0 +1,40 @@ +VERSION=0.2.0 + +BUILDDIR=target +RELEASEDIR=$(BUILDDIR)/release +DOCSOUTPUTDIR=$(BUILDDIR)/man +PREFIX?=/usr +_INSTDIR=$(DESTDIR)$(PREFIX) +BINDIR?=$(_INSTDIR)/bin +MANDIR?=$(PREFIX)/share/man +CARGO?=cargo +CARGOFLAGS?=--release + +all: build docs + +build: build-unstripped + strip $(RELEASEDIR)/finbudg + +build-unstripped: + $(CARGO) build $(CARGOFLAGS) + +docs: + mkdir -p $(DOCSOUTPUTDIR) + scdoc < docs/finbudg.1.scd > $(DOCSOUTPUTDIR)/finbudg.1 + scdoc < docs/finbudg.5.scd > $(DOCSOUTPUTDIR)/finbudg.5 + +clean: + rm -rf target/ + +install: + mkdir -p $(BINDIR) $(MANDIR)/man1 $(MANDIR)/man5 + install -m755 $(RELEASEDIR)/finbudg $(BINDIR)/finbudg + install -m644 $(DOCSOUTPUTDIR)/finbudg.1 $(MANDIR)/man1/finbudg.1 + install -m644 $(DOCSOUTPUTDIR)/finbudg.5 $(MANDIR)/man5/finbudg.5 + +uninstall: + rm -f $(BINDIR)/finbudg + rm -f $(MANDIR)/man1/finbudg.1 + rm -f $(MANDIR)/man5/finbudg.5 + +.PHONY: all build build-unstripped docs clean install uninstall |