From ac9ae08170243f1cbe31c8664baef02d787f2aa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Mon, 12 Jul 2021 22:03:11 +0200 Subject: Makefile: Add 'uninstall' target --- Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 74dd7bd..2ec406a 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,21 @@ +MAN != ls doc/*.[1-9] EXEC != find -H . -follow -type f -perm -111 ! -path '*/.git/*' +IMAN != echo " $(MAN)" | sed -E 's, doc/, /usr/local/man/man1/,g' IEXEC != echo " $(EXEC)" | sed -E 's, \./([^ ]*/)?, /usr/local/bin/,g' install: @echo Installing man pages... - @install -m 644 doc/*.[1-9] /usr/local/man/man1 + @install -m 644 $(MAN) /usr/local/man/man1 @echo Installing executables... @install $(EXEC) /usr/local/bin @echo Rewriting shebangs... @re! $(IEXEC) +uninstall: + @echo Uninstalling man pages... + @rm $(IMAN) + @echo Uninstalling executables... + @rm $(IEXEC) + build: build */*.c -- cgit v1.2.3