From ce8b74e904611afe5b9050fba24c93fb049f3c80 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Wed, 22 Feb 2017 00:17:35 -0800 Subject: flesh out Makefile with install target --- Makefile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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 -- cgit v1.2.3