* Don't flatten the directory hierarchy when installing headers
* Make it possible to have the Install program run in verbose mode when
the TOOL_VERBOSE=1 option is set
* Ensure non-executable installed files do not install with execute perms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20214 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Makefile.rules b/Makefile.rules
index 78cc436..fc4e7a8 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -305,6 +305,7 @@
C.Flags += -v
CXX.Flags += -v
LD.Flags += -v
+ Install.Flags += -v
VERBOSE := 1
endif
@@ -322,6 +323,7 @@
ifndef KEEP_SYMBOLS
Strip := $(PLATFORMSTRIPOPTS)
StripWarnMsg := "(without symbols)"
+ Install.Flags += -s
endif
# Adjust linker flags for building an executable
@@ -359,7 +361,9 @@
$(CompileCommonOpts) $(LD.Flags) $(Strip)
Relink = $(LIBTOOL) $(LibTool.Flags) --mode=link $(CXX) $(CPP.Flags) \
$(CompileCommonOpts)
-LTInstall = $(LIBTOOL) $(LibTool.Flags) --mode=install $(INSTALL)
+LTInstall = $(LIBTOOL) $(LibTool.Flags) --mode=install $(INSTALL) \
+ $(Install.Flags)
+Install = $(INSTALL) $(Install.Flags)
Burg = $(BURG) -I $(PROJ_SRC_DIR)
TableGen = $(TBLGEN) -I $(PROJ_SRC_DIR)
Archive = $(AR) $(AR.Flags)
@@ -526,9 +530,9 @@
$(Echo) Installing Configuration Files To $(PROJ_etcdir)
$(Verb)for file in $(CONFIG_FILES); do \
if test -f $(PROJ_OBJ_DIR)/$${file} ; then \
- $(INSTALL) $(PROJ_OBJ_DIR)/$${file} $(PROJ_etcdir) ; \
+ $(Install) -D -m 0644 $(PROJ_OBJ_DIR)/$${file} $(PROJ_etcdir) ; \
elif test -f $(PROJ_SRC_DIR)/$${file} ; then \
- $(INSTALL) $(PROJ_SRC_DIR)/$${file} $(PROJ_etcdir) ; \
+ $(Install) -D -m 0644 $(PROJ_SRC_DIR)/$${file} $(PROJ_etcdir) ; \
else \
$(ECHO) Error: cannot find config file $${file}. ; \
fi \
@@ -590,7 +594,7 @@
$(DestModule): $(ModuleDestDir) $(Module)
$(Echo) Installing $(BuildMode) Bytecode Module $(DestModule)
- $(Verb) $(INSTALL) $(Module) $@
+ $(Verb) $(Install) -D $(Module) $@
uninstall-local::
$(Echo) Uninstalling $(BuildMode) Bytecode Module $(DestModule)
@@ -704,7 +708,7 @@
$(DestBytecodeLib): $(BytecodeDestDir) $(LibName.BCA)
$(Echo) Installing $(BuildMode) Bytecode Archive $(DestBytecodeLib)
- $(Verb) $(INSTALL) $(LibName.BCA) $@
+ $(Verb) $(Install) -D $(LibName.BCA) $@
uninstall-local::
$(Echo) Uninstalling $(BuildMode) Bytecode Archive $(DestBytecodeLib)
@@ -898,7 +902,7 @@
$(DestTool): $(PROJ_bindir) $(ToolBuildPath)
$(Echo) Installing $(BuildMode) $(DestTool)
- $(Verb) $(INSTALL) $(ToolBuildPath) $(DestTool)
+ $(Verb) $(Install) -D $(ToolBuildPath) $(DestTool)
uninstall-local::
$(Echo) Uninstalling $(BuildMode) $(DestTool)
@@ -1465,13 +1469,13 @@
cd $(PROJ_SRC_ROOT)/include && \
for hdr in `find . -type f '!' '(' -name '*~' -o -name '.cvsignore' \
-o -name '.#*' -o -name '*.in' ')' -print | grep -v CVS ` ; do \
- $(INSTALL) $$hdr $(PROJ_includedir) ; \
+ $(Install) -D -m 0644 $$hdr $(PROJ_includedir)/$$hdr ; \
done ; \
fi
$(Verb) if [ -d "$(PROJ_OBJ_ROOT)/include" ] ; then \
cd $(PROJ_OBJ_ROOT)/include && \
for hdr in `find . -type f -print` ; do \
- $(INSTALL) $$hdr $(PROJ_includedir) ; \
+ $(Install) -D -m 0644 $$hdr $(PROJ_includedir)/$$hdr ; \
done ; \
fi
@@ -1504,6 +1508,7 @@
$(Echo) "PROJ_bindir : " '$(PROJ_bindir)'
$(Echo) "PROJ_libdir : " '$(PROJ_libdir)'
$(Echo) "PROJ_etcdir : " '$(PROJ_etcdir)'
+ $(Echo) "PROJ_includedir : " '$(PROJ_includedir)'
$(Echo) "UserTargets : " '$(UserTargets)'
$(Echo) "ObjMakefiles : " '$(ObjMakefiles)'
$(Echo) "SrcMakefiles : " '$(SrcMakefiles)'