From: Dylan Noblesmith Date: Wed, 1 Feb 2012 22:23:31 +0000 (+0000) Subject: make: fix installation of generated header files X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=873488a9d5ab7774bdcccada7ef0f90e5e5eda14;p=clang make: fix installation of generated header files 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 --- diff --git a/include/clang-c/Makefile b/include/clang-c/Makefile index 81f5f41b17..b29e29ea1e 100644 --- a/include/clang-c/Makefile +++ b/include/clang-c/Makefile @@ -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 diff --git a/include/clang/Makefile b/include/clang/Makefile index 4398f3aed5..5f2077d2f0 100644 --- a/include/clang/Makefile +++ b/include/clang/Makefile @@ -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