From 05f1232982c901ef7c98d2e99314e61f154cfd23 Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Thu, 4 Feb 2016 21:46:45 +0100 Subject: [PATCH] Simple tweak to the Makefile to support DESTDIR Wondering whether full autoconf/automake is worth for these two simple tools, probably not. --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 2d617f8..2938ef6 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ CFLAGS?= -Wall -O2 -SBINDIR= /sbin -BINDIR= /bin -USRBINDIR= /usr/bin -MANDIR= /usr/share/man +SBINDIR= $(DESTDIR)/sbin +BINDIR= $(DESTDIR)/bin +USRBINDIR= $(DESTDIR)/usr/bin +MANDIR= $(DESTDIR)/usr/share/man MTDIR=$(BINDIR) @@ -14,6 +14,7 @@ all: $(PROGS) $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< install: $(PROGS) + install -d $(MTDIR) $(MANDIR) $(SBINDIR) install -s mt $(MTDIR) install -c -m 444 mt.1 $(MANDIR)/man1 (if [ -f $(MANDIR)/man1/mt.1.gz ] ; then \