aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile17
1 files changed, 17 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index db6ed36..a682255 100644
--- a/Makefile
+++ b/Makefile
@@ -2,10 +2,15 @@
RONN = ronn
MANPAGE = einhyrningsins.1
+INSTALL = install
+PREFIX = /usr/local
+
+.PHONY: docs
docs: doc/*.ronn
$(RONN) -r doc/*.ronn
$(RONN) --style toc -5 doc/*.ronn
+.PHONY: gh-pages
gh-pages: docs
mkdir -p /tmp/einhyrningsins-ronn
cp doc/*.1.html /tmp/einhyrningsins-ronn
@@ -15,3 +20,15 @@ gh-pages: docs
git commit -m "updating rendered manpage for github docs" || true
git checkout master
rm -r /tmp/einhyrningsins-ronn
+
+.PHONY: build
+build: src/*.rs src/bin/*.rs
+ cargo build --release
+
+.PHONY: install
+install:
+ $(INSTALL) -t $(PREFIX)/bin target/release/einhyrningsins
+ $(INSTALL) -t $(PREFIX)/bin target/release/einhyrningsinsctl
+ # Trying to install manpages; ok if this fails
+ $(INSTALL) -m 644 -t $(PREFIX)/share/man/man1 doc/einhyrningsins.1
+ $(INSTALL) -m 644 -t $(PREFIX)/share/man/man1 doc/einhyrningsinsctl.1