Simple tweak to the Makefile to support DESTDIR

Wondering whether full autoconf/automake is worth for these two simple
tools, probably not.
This commit is contained in:
Iustin Pop
2016-02-04 21:46:45 +01:00
parent e4367cfb8c
commit 05f1232982
+5 -4
View File
@@ -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 \