Skip to content

Commit 122bda5

Browse files
committed
Merge r98192 from mainline.
add DESTDIR support for clang headers, PR6556. Patch by Matthias Klose! llvm-svn: 98304
1 parent 6e1a72f commit 122bda5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

clang/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,27 +39,27 @@ cscope.files:
3939

4040
install-local::
4141
$(Echo) Installing include files
42-
$(Verb) $(MKDIR) $(PROJ_includedir)
42+
$(Verb) $(MKDIR) $(DESTDIR)$(PROJ_includedir)
4343
$(Verb) if test -d "$(PROJ_SRC_ROOT)/tools/clang/include" ; then \
4444
cd $(PROJ_SRC_ROOT)/tools/clang/include && \
4545
for hdr in `find . -type f '!' '(' -name '*~' \
4646
-o -name '.#*' -o -name '*.in' -o -name '*.txt' \
4747
-o -name 'Makefile' -o -name '*.td' ')' -print \
4848
| grep -v CVS | grep -v .svn | grep -v .dir` ; do \
49-
instdir=`dirname "$(PROJ_includedir)/$$hdr"` ; \
49+
instdir=$(DESTDIR)`dirname "$(PROJ_includedir)/$$hdr"` ; \
5050
if test \! -d "$$instdir" ; then \
5151
$(EchoCmd) Making install directory $$instdir ; \
5252
$(MKDIR) $$instdir ;\
5353
fi ; \
54-
$(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \
54+
$(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \
5555
done ; \
5656
fi
5757
ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
5858
$(Verb) if test -d "$(PROJ_OBJ_ROOT)/tools/clang/include" ; then \
5959
cd $(PROJ_OBJ_ROOT)/tools/clang/include && \
6060
for hdr in `find . -type f '!' '(' -name 'Makefile' ')' -print \
6161
| grep -v CVS | grep -v .tmp | grep -v .dir` ; do \
62-
$(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \
62+
$(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \
6363
done ; \
6464
fi
6565
endif

0 commit comments

Comments
 (0)