From 2464983140ab2e25fb04a67b3fae169542b44324 Mon Sep 17 00:00:00 2001
From: Alberto Bertogli <albertito@blitiri.com.ar>
Date: Fri, 24 Jul 2009 20:38:11 -0300
Subject: [PATCH 48/74] Decouple PREFIX and DESTDIR

Sometimes we want to do a "fake install" and then manually move the
result binaries somewhere else. This patch allows that by adding a new
DESTDIR variable that can be used to tell the real final location of the
binaries.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
---
 libjio/Makefile |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/libjio/Makefile b/libjio/Makefile
index 9a82a94..157022e 100644
--- a/libjio/Makefile
+++ b/libjio/Makefile
@@ -33,6 +33,8 @@ endif
 # prefix for installing the binaries
 PREFIX = /usr/local
 
+# prefix for eventual location of binaries
+DESTDIR=$(PREFIX)
 
 # install utility, we assume it's GNU/BSD compatible
 INSTALL=install
@@ -64,7 +66,7 @@ libjio.a: $(OBJS)
 libjio.pc: libjio.skel.pc
 	@echo "generating libjio.pc"
 	@cat libjio.skel.pc | \
-		sed 's@++PREFIX++@$(PREFIX)@g' | \
+		sed 's@++PREFIX++@$(DESTDIR)@g' | \
 		sed 's@++CFLAGS++@$(MANDATORY_CFLAGS)@g' \
 		> libjio.pc
 
-- 
1.6.2.2.646.gb214


