From 2725003d450d6289d9297c05efb57ecd768f3cd4 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Tue, 19 Oct 2021 09:42:08 +0200 Subject: Makefile: Prefix installation paths with $(DESTDIR) Martin reports that DESTDIR is ignored in install/uninstall targets, see also: https://www.gnu.org/prep/standards/html_node/DESTDIR.html Reported-by: Martin Hauke Signed-off-by: Stefano Brivio --- Makefile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 0697b53..2385afa 100644 --- a/Makefile +++ b/Makefile @@ -38,17 +38,17 @@ clean: passt.tar passt.tar.gz *.deb *.rpm install: passt pasta qrap - mkdir -p $(prefix)/bin $(prefix)/man/man1 - cp -d passt pasta qrap $(prefix)/bin - cp -d passt.1 pasta.1 qrap.1 $(prefix)/man/man1 + mkdir -p $(DESTDIR)$(prefix)/bin $(DESTDIR)$(prefix)/man/man1 + cp -d passt pasta qrap $(DESTDIR)$(prefix)/bin + cp -d passt.1 pasta.1 qrap.1 $(DESTDIR)$(prefix)/man/man1 uninstall: - -${RM} $(prefix)/bin/passt - -${RM} $(prefix)/bin/pasta - -${RM} $(prefix)/bin/qrap - -${RM} $(prefix)/man/man1/passt.1 - -${RM} $(prefix)/man/man1/pasta.1 - -${RM} $(prefix)/man/man1/qrap.1 + -${RM} $(DESTDIR)$(prefix)/bin/passt + -${RM} $(DESTDIR)$(prefix)/bin/pasta + -${RM} $(DESTDIR)$(prefix)/bin/qrap + -${RM} $(DESTDIR)$(prefix)/man/man1/passt.1 + -${RM} $(DESTDIR)$(prefix)/man/man1/pasta.1 + -${RM} $(DESTDIR)$(prefix)/man/man1/qrap.1 pkgs: tar cf passt.tar -P --xform 's//\/usr\/bin\//' passt pasta qrap -- cgit v1.2.3