blob: b29e29ea1ef8e3481f2527bb9d2dc9786369fccd [file] [log] [blame]
Daniel Dunbarafed0992010-06-08 20:34:18 +00001CLANG_LEVEL := ../..
Daniel Dunbar25cf7b42010-04-30 17:59:38 +00002DIRS :=
3
Daniel Dunbarafed0992010-06-08 20:34:18 +00004include $(CLANG_LEVEL)/Makefile
Daniel Dunbar25cf7b42010-04-30 17:59:38 +00005
Bob Wilson3e627ae2011-11-28 08:03:54 +00006IntIncludeDir = $(DESTDIR)$(PROJ_internal_prefix)/include
7
Daniel Dunbar25cf7b42010-04-30 17:59:38 +00008install-local::
9 $(Echo) Installing Clang C API include files
Bob Wilson3e627ae2011-11-28 08:03:54 +000010 $(Verb) $(MKDIR) $(IntIncludeDir)
NAKAMURA Takumi5460ff32011-12-05 06:13:20 +000011 $(Verb) if test -d "$(PROJ_SRC_DIR)" ; then \
12 cd $(PROJ_SRC_DIR)/.. && \
Daniel Dunbar25cf7b42010-04-30 17:59:38 +000013 for hdr in `find clang-c -type f '!' '(' -name '*~' \
14 -o -name '.#*' -o -name '*.in' -o -name '*.txt' \
15 -o -name 'Makefile' -o -name '*.td' ')' -print \
16 | grep -v CVS | grep -v .svn | grep -v .dir` ; do \
Bob Wilson3e627ae2011-11-28 08:03:54 +000017 instdir=`dirname "$(IntIncludeDir)/$$hdr"` ; \
Daniel Dunbar25cf7b42010-04-30 17:59:38 +000018 if test \! -d "$$instdir" ; then \
19 $(EchoCmd) Making install directory $$instdir ; \
20 $(MKDIR) $$instdir ;\
21 fi ; \
Bob Wilson3e627ae2011-11-28 08:03:54 +000022 $(DataInstall) $$hdr $(IntIncludeDir)/$$hdr ; \
Daniel Dunbar25cf7b42010-04-30 17:59:38 +000023 done ; \
24 fi
25ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
26 $(Verb) if test -d "$(PROJ_OBJ_ROOT)/tools/clang/include/clang-c" ; then \
27 cd $(PROJ_OBJ_ROOT)/tools/clang/include && \
28 for hdr in `find clang-c -type f '!' '(' -name 'Makefile' ')' -print \
29 | grep -v CVS | grep -v .tmp | grep -v .dir` ; do \
Dylan Noblesmith873488a2012-02-01 22:23:31 +000030 instdir=`dirname "$(IntIncludeDir)/$$hdr"` ; \
31 if test \! -d "$$instdir" ; then \
32 $(EchoCmd) Making install directory $$instdir ; \
33 $(MKDIR) $$instdir ;\
34 fi ; \
Bob Wilson3e627ae2011-11-28 08:03:54 +000035 $(DataInstall) $$hdr $(IntIncludeDir)/$$hdr ; \
Daniel Dunbar25cf7b42010-04-30 17:59:38 +000036 done ; \
37 fi
38endif