aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 10 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index c49dd38..131acc5 100644
--- a/Makefile
+++ b/Makefile
@@ -6,13 +6,19 @@ MANDIR = ${DPREFIX}/share/man
target = target/release/mmv
+mmv = $${MMV_NAME:-mmv}
+mcp = $${MCP_NAME:-mcp}
+
all: ${target}
${target}: src/main.rs
cargo build --release
install:
mkdir -p ${DPREFIX}/bin ${DPREFIX}/share/man/man1
- cp ${target} ${DPREFIX}/bin/mmv
- cp ${target} ${DPREFIX}/bin/mcp
- cp mmv.1 ${MANDIR}/man1
- ln -srf ${MANDIR}/man1/mmv.1 ${MANDIR}/man1/mcp.1
+ cp ${target} ${DPREFIX}/bin/${mmv}
+ cp mmv.1 ${MANDIR}/man1/${mmv}.1
+ ln -srf ${DPREFIX}/bin/${mmv} ${DPREFIX}/bin/${mcp}
+ ln -srf ${MANDIR}/man1/${mmv}.1 ${MANDIR}/man1/${mcp}.1
+
+clean:
+ rm -rf target