From 5afda07f1c8f4af55b00988493621aa1a5b5c7d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Mah=C3=A9?= Date: Sat, 23 Mar 2024 12:26:43 +0100 Subject: [PATCH] make install and uninstall more generic --- Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 01d45e1..09eddcb 100644 --- a/Makefile +++ b/Makefile @@ -83,11 +83,15 @@ dist-clean: clean rm -f *~ ./src/*~ ./tests/*~ ./man/*~ install: $(PROG) $(MAN) - /usr/bin/install -c ./$(PROG) '/usr/local/bin' - /usr/bin/install -c $(MAN) '/usr/local/share/man/man1' + $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(bindir) + $(INSTALL_PROGRAM) $(MAN) $(DESTDIR)$(man1dir) + +uninstall: + rm $(DESTDIR)$(bindir)/$(PROG) + rm $(DESTDIR)$(man1dir)/$(PROG).1 check: bash ./tests/mumu.sh ./$(PROG) # make sure rules run even if no file was modified -.PHONY: all clean coverage debug dist-clean install profile check +.PHONY: all clean coverage debug dist-clean install uninstall profile check