From 3e627ae2a918f0268f23c3f7ba62fd7df9ab30e1 Mon Sep 17 00:00:00 2001 From: Bob Wilson Date: Mon, 28 Nov 2011 08:03:54 +0000 Subject: [PATCH] Install c-index-test and clang-c/Index.h as internal files. rdar://10217046 Specify that these files should be installed to the optional internal install location as specified by configure's --with-internal-prefix. If that option is not used, they'll be installed to the default prefix as before. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145235 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang-c/Makefile | 10 ++++++---- tools/c-index-test/Makefile | 4 ++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/include/clang-c/Makefile b/include/clang-c/Makefile index 98ea7190e6..3f3ae5843e 100644 --- a/include/clang-c/Makefile +++ b/include/clang-c/Makefile @@ -3,21 +3,23 @@ DIRS := include $(CLANG_LEVEL)/Makefile +IntIncludeDir = $(DESTDIR)$(PROJ_internal_prefix)/include + install-local:: $(Echo) Installing Clang C API include files - $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_includedir) + $(Verb) $(MKDIR) $(IntIncludeDir) $(Verb) if test -d "$(PROJ_SRC_ROOT)/tools/clang/include/clang-c" ; then \ cd $(PROJ_SRC_ROOT)/tools/clang/include && \ for hdr in `find clang-c -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=$(DESTDIR)`dirname "$(PROJ_includedir)/$$hdr"` ; \ + instdir=`dirname "$(IntIncludeDir)/$$hdr"` ; \ if test \! -d "$$instdir" ; then \ $(EchoCmd) Making install directory $$instdir ; \ $(MKDIR) $$instdir ;\ fi ; \ - $(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \ + $(DataInstall) $$hdr $(IntIncludeDir)/$$hdr ; \ done ; \ fi ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT)) @@ -25,7 +27,7 @@ ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT)) cd $(PROJ_OBJ_ROOT)/tools/clang/include && \ for hdr in `find clang-c -type f '!' '(' -name 'Makefile' ')' -print \ | grep -v CVS | grep -v .tmp | grep -v .dir` ; do \ - $(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \ + $(DataInstall) $$hdr $(IntIncludeDir)/$$hdr ; \ done ; \ fi endif diff --git a/tools/c-index-test/Makefile b/tools/c-index-test/Makefile index c21b3279a2..471ce912d0 100644 --- a/tools/c-index-test/Makefile +++ b/tools/c-index-test/Makefile @@ -10,6 +10,10 @@ CLANG_LEVEL := ../.. TOOLNAME = c-index-test +# If a separate install prefix was specified for internal tools, use it +# when installing c-index-test. +INTERNAL_TOOL = 1 + # No plugins, optimize startup time. TOOL_NO_EXPORTS = 1 -- 2.50.1