From a77230a6e873cc745e9f55eb73bac70a9b6ca7f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Andr=C3=A9e?= Date: Mon, 4 Jul 2016 13:18:13 +0200 Subject: [PATCH] Proper install support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use quotes to support spaces and such. Use -- to support dashes. And most important: Use DESTDIR to support installing into a staging directory. This is useful for packaging and verifying the install. Signed-off-by: Mattias Andrée --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index de0fff3..f7c3f8d 100644 --- a/Makefile +++ b/Makefile @@ -16,9 +16,9 @@ INSTALL = $(PREFIX)/bin/exa $(INSTALL): # BSD and OSX don't have -D to create leading directories - install -dm755 $(PREFIX)/bin/ $(PREFIX)/share/man/man1/ - install -sm755 target/release/exa $(PREFIX)/bin/ - install -m644 contrib/man/*.1 $(PREFIX)/share/man/man1/ + install -dm755 -- "$(PREFIX)/bin/" "$(DESTDIR)$(PREFIX)/share/man/man1/" + install -sm755 -- target/release/exa "$(DESTDIR)$(PREFIX)/bin/" + install -m644 -- contrib/man/*.1 "$(DESTDIR)$(PREFIX)/share/man/man1/" install: build $(INSTALL)