Skip to contentSkip to conversation

DESTDIR support in contrib/subtree/Makefile

PATCH Applied Adam Tkac 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore

Adam Tkac

author
#0 lore raw

PATCH 1/1 DESTDIR support in contrib/subtree/Makefile

---

It is a good habit in Makefiles to honor DESTDIR variable to support

make DESTDIR=/instalroot install

syntax.

Comments are welcomed.

Regards, Adam

 contrib/subtree/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
contrib/subtree/Makefile +2 -2
index 05cdd5c..36ae3e4 100644
@@ -30,12 +30,12 @@ $(GIT_SUBTREE): $(GIT_SUBTREE_SH)
 doc: $(GIT_SUBTREE_DOC)
 
 install: $(GIT_SUBTREE)
-	$(INSTALL) -m 755 $(GIT_SUBTREE) $(libexecdir)
+	$(INSTALL) -m 755 $(GIT_SUBTREE) $(DESTDIR)$(libexecdir)
 
 install-doc: install-man
 
 install-man: $(GIT_SUBTREE_DOC)
-	$(INSTALL) -m 644 $^ $(man1dir)
+	$(INSTALL) -m 644 $^ $(DESTDIR)$(man1dir)
 
 $(GIT_SUBTREE_DOC): $(GIT_SUBTREE_XML)
 	xmlto -m $(MANPAGE_NORMAL_XSL)  man $^
Signature · 5 lines
1.8.0


-- 
Adam Tkac, Red Hat, Inc.
#1 lore raw
Quoted 10 lines · Adam Tkac

---

It is a good habit in Makefiles to honor DESTDIR variable to support

make DESTDIR=/instalroot install

syntax.

Comments are welcomed.

Applied. I'll be sending this to the mailing list tonight or tomorrow.

-David