diff options
author | Bob Wilson <bob.wilson@apple.com> | 2011-11-28 07:59:52 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2011-11-28 07:59:52 +0000 |
commit | ae7e2a4bbbdfa82b4e2670fccb3a0aed812c3b0a (patch) | |
tree | a4936c790e8f93a220d379babfaca3877a126bf1 /Makefile.rules | |
parent | f86186ee244f3c938d04e0fccfa702410698c47b (diff) |
Add an optional separate install prefix for internal components. rdar://10217046
Some files installed by clang are not relevant for general users and we'd like
to be able to install them to a different location. This adds a new
--with-internal-prefix configure option and a corresponding PROJ_internal_prefix
makefile variable, which defaults to the standard prefix. A tool makefile
can specify that it should be installed to this internal prefix by defining
INTERNAL_TOOL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145234 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile.rules')
-rw-r--r-- | Makefile.rules | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Makefile.rules b/Makefile.rules index 3816bbb1a1..1c5effe65b 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -1503,12 +1503,19 @@ install-local:: uninstall-local:: $(Echo) Uninstall circumvented with NO_INSTALL else -DestTool = $(DESTDIR)$(PROJ_bindir)/$(TOOLEXENAME) + +ifdef INTERNAL_TOOL +ToolBinDir = $(DESTDIR)$(PROJ_internal_prefix)/bin +else +ToolBinDir = $(DESTDIR)$(PROJ_bindir) +endif +DestTool = $(ToolBinDir)/$(TOOLEXENAME) install-local:: $(DestTool) -$(DestTool): $(ToolBuildPath) $(DESTDIR)$(PROJ_bindir) +$(DestTool): $(ToolBuildPath) $(Echo) Installing $(BuildMode) $(DestTool) + $(Verb) $(MKDIR) $(ToolBinDir) $(Verb) $(ProgInstall) $(ToolBuildPath) $(DestTool) uninstall-local:: @@ -1517,7 +1524,7 @@ uninstall-local:: # TOOLALIAS install. ifdef TOOLALIAS -DestToolAlias = $(DESTDIR)$(PROJ_bindir)/$(TOOLALIAS)$(EXEEXT) +DestToolAlias = $(ToolBinDir)/$(TOOLALIAS)$(EXEEXT) install-local:: $(DestToolAlias) @@ -2276,6 +2283,7 @@ printvars:: $(Echo) "LLVM_SRC_ROOT: " '$(LLVM_SRC_ROOT)' $(Echo) "LLVM_OBJ_ROOT: " '$(LLVM_OBJ_ROOT)' $(Echo) "PROJ_prefix : " '$(PROJ_prefix)' + $(Echo) "PROJ_internal_prefix : " '$(PROJ_internal_prefix)' $(Echo) "PROJ_bindir : " '$(PROJ_bindir)' $(Echo) "PROJ_libdir : " '$(PROJ_libdir)' $(Echo) "PROJ_etcdir : " '$(PROJ_etcdir)' |