summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-10 21:26:01 +0000
committerChris Lattner <sabre@nondot.org>2010-03-10 21:26:01 +0000
commitdefd016cbab3dba44694c6f718d7e560247a1301 (patch)
tree834af01838619843129ac1f1e73f8f2be346885d /Makefile
parent2bc1d3a3b71564dc2909420abdd58aaf35191de2 (diff)
add DESTDIR support for clang headers, PR6556.
Patch by Matthias Klose! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98192 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 8d3fa29a75..481dd389aa 100644
--- a/Makefile
+++ b/Makefile
@@ -39,19 +39,19 @@ cscope.files:
install-local::
$(Echo) Installing include files
- $(Verb) $(MKDIR) $(PROJ_includedir)
+ $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_includedir)
$(Verb) if test -d "$(PROJ_SRC_ROOT)/tools/clang/include" ; then \
cd $(PROJ_SRC_ROOT)/tools/clang/include && \
for hdr in `find . -type f '!' '(' -name '*~' \
-o -name '.#*' -o -name '*.in' -o -name '*.txt' \
-o -name 'Makefile' -o -name '*.td' ')' -print \
| grep -v CVS | grep -v .svn | grep -v .dir` ; do \
- instdir=`dirname "$(PROJ_includedir)/$$hdr"` ; \
+ instdir=$(DESTDIR)`dirname "$(PROJ_includedir)/$$hdr"` ; \
if test \! -d "$$instdir" ; then \
$(EchoCmd) Making install directory $$instdir ; \
$(MKDIR) $$instdir ;\
fi ; \
- $(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \
+ $(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \
done ; \
fi
ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
@@ -59,7 +59,7 @@ ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
cd $(PROJ_OBJ_ROOT)/tools/clang/include && \
for hdr in `find . -type f '!' '(' -name 'Makefile' ')' -print \
| grep -v CVS | grep -v .tmp | grep -v .dir` ; do \
- $(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \
+ $(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \
done ; \
fi
endif