]> granicus.if.org Git - clang/commitdiff
make: fix installation of generated header files
authorDylan Noblesmith <nobled@dreamwidth.org>
Wed, 1 Feb 2012 22:23:31 +0000 (22:23 +0000)
committerDylan Noblesmith <nobled@dreamwidth.org>
Wed, 1 Feb 2012 22:23:31 +0000 (22:23 +0000)
The PROJ_SRC_DIR != PROJ_OBJ_DIR path was missing the directory
creation logic that was in the path for non-generated headers.
PR11903.

(The oversight was copied and pasted from LLVM's Makefile.rules,
where it apparently existed since time immemorial til it was
corrected in r127325.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149551 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang-c/Makefile
include/clang/Makefile

index 81f5f41b17642393f6661a35270671cb34d67ea5..b29e29ea1ef8e3481f2527bb9d2dc9786369fccd 100644 (file)
@@ -27,6 +27,11 @@ 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 \
+           instdir=`dirname "$(IntIncludeDir)/$$hdr"` ; \
+           if test \! -d "$$instdir" ; then \
+             $(EchoCmd) Making install directory $$instdir ; \
+             $(MKDIR) $$instdir ;\
+           fi ; \
            $(DataInstall) $$hdr $(IntIncludeDir)/$$hdr ; \
          done ; \
        fi
index 4398f3aed5759e831de5eba05004428841b9a072..5f2077d2f04159f33c44f982c3da5780e6568e6a 100644 (file)
@@ -33,6 +33,11 @@ ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
               -o -name '*.inc' \
              ')' -print \
             | grep -v CVS | grep -v .tmp | grep -v .dir` ; do \
+           instdir=$(DESTDIR)`dirname "$(PROJ_includedir)/$$hdr"` ; \
+           if test \! -d "$$instdir" ; then \
+             $(EchoCmd) Making install directory $$instdir ; \
+             $(MKDIR) $$instdir ;\
+           fi ; \
            $(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \
          done ; \
        fi