Daniel Dunbar | afed099 | 2010-06-08 20:34:18 +0000 | [diff] [blame] | 1 | CLANG_LEVEL := ../.. |
Daniel Dunbar | 25cf7b4 | 2010-04-30 17:59:38 +0000 | [diff] [blame] | 2 | DIRS := |
| 3 | |
Daniel Dunbar | afed099 | 2010-06-08 20:34:18 +0000 | [diff] [blame] | 4 | include $(CLANG_LEVEL)/Makefile |
Daniel Dunbar | 25cf7b4 | 2010-04-30 17:59:38 +0000 | [diff] [blame] | 5 | |
Bob Wilson | 3e627ae | 2011-11-28 08:03:54 +0000 | [diff] [blame] | 6 | IntIncludeDir = $(DESTDIR)$(PROJ_internal_prefix)/include |
| 7 | |
Daniel Dunbar | 25cf7b4 | 2010-04-30 17:59:38 +0000 | [diff] [blame] | 8 | install-local:: |
| 9 | $(Echo) Installing Clang C API include files |
Bob Wilson | 3e627ae | 2011-11-28 08:03:54 +0000 | [diff] [blame] | 10 | $(Verb) $(MKDIR) $(IntIncludeDir) |
NAKAMURA Takumi | 5460ff3 | 2011-12-05 06:13:20 +0000 | [diff] [blame] | 11 | $(Verb) if test -d "$(PROJ_SRC_DIR)" ; then \ |
| 12 | cd $(PROJ_SRC_DIR)/.. && \ |
Daniel Dunbar | 25cf7b4 | 2010-04-30 17:59:38 +0000 | [diff] [blame] | 13 | 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 Wilson | 3e627ae | 2011-11-28 08:03:54 +0000 | [diff] [blame] | 17 | instdir=`dirname "$(IntIncludeDir)/$$hdr"` ; \ |
Daniel Dunbar | 25cf7b4 | 2010-04-30 17:59:38 +0000 | [diff] [blame] | 18 | if test \! -d "$$instdir" ; then \ |
| 19 | $(EchoCmd) Making install directory $$instdir ; \ |
| 20 | $(MKDIR) $$instdir ;\ |
| 21 | fi ; \ |
Bob Wilson | 3e627ae | 2011-11-28 08:03:54 +0000 | [diff] [blame] | 22 | $(DataInstall) $$hdr $(IntIncludeDir)/$$hdr ; \ |
Daniel Dunbar | 25cf7b4 | 2010-04-30 17:59:38 +0000 | [diff] [blame] | 23 | done ; \ |
| 24 | fi |
| 25 | ifneq ($(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 Noblesmith | 873488a | 2012-02-01 22:23:31 +0000 | [diff] [blame] | 30 | instdir=`dirname "$(IntIncludeDir)/$$hdr"` ; \ |
| 31 | if test \! -d "$$instdir" ; then \ |
| 32 | $(EchoCmd) Making install directory $$instdir ; \ |
| 33 | $(MKDIR) $$instdir ;\ |
| 34 | fi ; \ |
Bob Wilson | 3e627ae | 2011-11-28 08:03:54 +0000 | [diff] [blame] | 35 | $(DataInstall) $$hdr $(IntIncludeDir)/$$hdr ; \ |
Daniel Dunbar | 25cf7b4 | 2010-04-30 17:59:38 +0000 | [diff] [blame] | 36 | done ; \ |
| 37 | fi |
| 38 | endif |