Fix installation of configured headers when objdir != srcdir. Patch
contributed by Vladimir Merzliakov!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20084 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Makefile.rules b/Makefile.rules
index d34e93a..5e31582 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -1450,18 +1450,26 @@
$(Verb) if [ -d "$(PROJ_SRC_ROOT)/include" ] ; then \
cd $(PROJ_SRC_ROOT)/include && \
find . -path '*/Internal' -prune -o '(' -type f \
- '!' '(' -name '*~' -o -name '.cvsignore' -o -name '.#*' ')' \
+ '!' '(' -name '*~' -o -name '.cvsignore' -o -name '.#*' -o -name '*.in' ')' \
-print ')' | grep -v CVS | pax -rwdvpe $(PROJ_includedir) ; \
fi
+ $(Verb) if [ -d "$(PROJ_OBJ_ROOT)/include" ] ; then \
+ cd $(PROJ_OBJ_ROOT)/include && ( cd $(PROJ_SRC_ROOT)/include && \
+ find . -path '*/Internal' -prune -o '(' -type f -name '*.in' -print ')' ) \
+ | sed 's#.in$$##' | pax -rwdvpe $(PROJ_includedir) ; \
+ fi
uninstall-local::
$(Echo) Uninstalling include files
$(Verb) if [ -d "$(PROJ_SRC_ROOT)/include" ] ; then \
cd $(PROJ_SRC_ROOT)/include && \
$(RM) -f `find . -path '*/Internal' -prune -o '(' -type f \
- '!' '(' -name '*~' -o -name '.cvsignore' -o -name '.#*' ')' \
+ '!' '(' -name '*~' -o -name '.cvsignore' -o -name '.#*' -o -name '*.in' ')' \
-print ')' | grep -v CVS | sed 's#^#$(PROJ_includedir)/#'` ; \
- fi
+ cd $(PROJ_SRC_ROOT)/include && \
+ $(RM) -f `find . -path '*/Internal' -prune -o '(' -type f -name '*.in' -print ')' \
+ | sed 's#\.in$$##;s#^#$(PROJ_includedir)/#'` ; \
+ fi
endif