# [PATCH] DESTDIR support in contrib/subtree/Makefile

2 messages from 2012-11-29 to 2013-01-01. Participants: Adam Tkac, greened@obbligato.org.
Thread: https://gitlist.dev/t/32243

## Adam Tkac, 2012-11-29 15:41

Subject: [PATCH] DESTDIR support in contrib/subtree/Makefile
Message-ID: <20121129154057.GA4300@redhat.com>
URL: https://gitlist.dev/e/20121129154057.GA4300%40redhat.com

```
Signed-off-by: Adam Tkac <atkac@redhat.com>
---

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(-)

diff --git a/contrib/subtree/Makefile b/contrib/subtree/Makefile
index 05cdd5c..36ae3e4 100644
--- a/contrib/subtree/Makefile
+++ b/contrib/subtree/Makefile
@@ -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 $^
-- 
1.8.0


-- 
Adam Tkac, Red Hat, Inc.

```

## greened@obbligato.org, 2013-01-01 02:58

Subject: Re: [PATCH] DESTDIR support in contrib/subtree/Makefile
Message-ID: <87a9sty5h2.fsf@waller.obbligato.org>
URL: https://gitlist.dev/e/87a9sty5h2.fsf%40waller.obbligato.org
In-Reply-To: <20121129154057.GA4300@redhat.com>

```
Adam Tkac <atkac@redhat.com> writes:

> Signed-off-by: Adam Tkac <atkac@redhat.com>
> ---
>
> 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

```
