aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 22 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index ec06e96..47220d7 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,26 @@
PREFIX ?= /usr/local
-MAN_PREFIX ?= ${PREFIX}/man
+BIN_DEST ?= ${PREFIX}/bin
+MAN_DEST ?= ${PREFIX}/man
+CARGO ?= cargo
+SCDOC ?= scdoc
+RM ?= rm
+
+default:
+ @${CARGO} build
+release:
+ @${CARGO} build --release --locked --all-features --target-dir=target
manpage:
- scdoc < man/rs.1.scd > man/rs.1
+ @${SCDOC} < man/rs.1.scd > man/rs.1
+install: release manpage
+ install -Dm 755 -t "${BIN_DEST}" target/release/rs
+ install -Dm 555 -t "${MAN_DEST}" man/rs.1
+
+run:
+ @${CARGO} run
+fmt:
+ @${CARGO} fmt
+clean:
+ @${RM} man/rs.1
+ @${CARGO} clean