1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
From: Boyuan Yang <byang@debian.org>
Date: Tue, 29 Aug 2023 11:38:59 -0400
Subject: Makefile: Patch to recognize DESTDIR
Forwarded: no
Last-Update: 2023-08-29
---
Makefile | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index b2998c9..19c33ab 100644
--- a/Makefile
+++ b/Makefile
@@ -13,6 +13,7 @@ MANPAGE = 1
################################################################
OBJECTS = $(CXXFILES:.C=.o)
+DESTDIR =
all: $(PROGRAM)
@@ -49,9 +50,9 @@ include makedepend
install: $(PROGRAM)
-@mkdir -p $(bindir)
- $(INSTALL) -s $(PROGRAM) $(bindir)/$(PROGRAM)
+ $(INSTALL) -D $(PROGRAM) $(DESTDIR)$(bindir)/$(PROGRAM)
-@mkdir -p $(mandir)/man$(MANPAGE)
- $(INSTALL) $(PROGRAM).$(MANPAGE) $(mandir)/man$(MANPAGE)/$(PROGRAM).$(MANPAGE)
+ $(INSTALL) -D $(PROGRAM).$(MANPAGE) $(DESTDIR)$(mandir)/man$(MANPAGE)/$(PROGRAM).$(MANPAGE)
uninstall:
-@ rm -f $(bindir)/$(PROGRAM)
|