llvm.org GIT mirror llvm / ae7e2a4
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 Bob Wilson 7 years ago
4 changed file(s) with 40 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
8383 ifndef PROJ_VERSION
8484 PROJ_VERSION := 1.0
8585 endif
86 endif
87
88 INTERNAL_PREFIX := @INTERNAL_PREFIX@
89 ifneq ($(INTERNAL_PREFIX),)
90 PROJ_internal_prefix := $(INTERNAL_PREFIX)
91 else
92 PROJ_internal_prefix := $(prefix)
8693 endif
8794
8895 PROJ_bindir := $(PROJ_prefix)/bin
15021502 uninstall-local::
15031503 $(Echo) Uninstall circumvented with NO_INSTALL
15041504 else
1505 DestTool = $(DESTDIR)$(PROJ_bindir)/$(TOOLEXENAME)
1505
1506 ifdef INTERNAL_TOOL
1507 ToolBinDir = $(DESTDIR)$(PROJ_internal_prefix)/bin
1508 else
1509 ToolBinDir = $(DESTDIR)$(PROJ_bindir)
1510 endif
1511 DestTool = $(ToolBinDir)/$(TOOLEXENAME)
15061512
15071513 install-local:: $(DestTool)
15081514
1509 $(DestTool): $(ToolBuildPath) $(DESTDIR)$(PROJ_bindir)
1515 $(DestTool): $(ToolBuildPath)
15101516 $(Echo) Installing $(BuildMode) $(DestTool)
1517 $(Verb) $(MKDIR) $(ToolBinDir)
15111518 $(Verb) $(ProgInstall) $(ToolBuildPath) $(DestTool)
15121519
15131520 uninstall-local::
15161523
15171524 # TOOLALIAS install.
15181525 ifdef TOOLALIAS
1519 DestToolAlias = $(DESTDIR)$(PROJ_bindir)/$(TOOLALIAS)$(EXEEXT)
1526 DestToolAlias = $(ToolBinDir)/$(TOOLALIAS)$(EXEEXT)
15201527
15211528 install-local:: $(DestToolAlias)
15221529
22752282 $(Echo) "LLVM_SRC_ROOT: " '$(LLVM_SRC_ROOT)'
22762283 $(Echo) "LLVM_OBJ_ROOT: " '$(LLVM_OBJ_ROOT)'
22772284 $(Echo) "PROJ_prefix : " '$(PROJ_prefix)'
2285 $(Echo) "PROJ_internal_prefix : " '$(PROJ_internal_prefix)'
22782286 $(Echo) "PROJ_bindir : " '$(PROJ_bindir)'
22792287 $(Echo) "PROJ_libdir : " '$(PROJ_libdir)'
22802288 $(Echo) "PROJ_etcdir : " '$(PROJ_etcdir)'
884884 esac],
885885 llvm_cv_enable_libffi=no)
886886
887 AC_ARG_WITH(internal-prefix,
888 AS_HELP_STRING([--with-internal-prefix],
889 [Installation directory for internal files]),,
890 withval="")
891 AC_SUBST(INTERNAL_PREFIX,[$withval])
892
887893 dnl===-----------------------------------------------------------------------===
888894 dnl===
889895 dnl=== SECTION 4: Check for programs we need and that they are the right version
710710 EXTRA_LD_OPTIONS
711711 CLANG_SRC_ROOT
712712 BINUTILS_INCDIR
713 INTERNAL_PREFIX
713714 NM
714715 ifGNUmake
715716 LN_S
14501451 plugin-api.h file for gold plugin.
14511452 --with-bug-report-url Specify the URL where bug reports should be
14521453 submitted (default=http://llvm.org/bugs/)
1454 --with-internal-prefix Installation directory for internal files
14531455 --with-tclinclude directory where tcl headers are
14541456 --with-udis86= Use udis86 external x86 disassembler library
14551457 --with-oprofile=
56705672
56715673
56725674
5675 # Check whether --with-internal-prefix was given.
5676 if test "${with_internal_prefix+set}" = set; then
5677 withval=$with_internal_prefix;
5678 else
5679 withval=""
5680 fi
5681
5682 INTERNAL_PREFIX=$withval
5683
5684
5685
56735686 { echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
56745687 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; }
56755688 if test "${lt_cv_path_NM+set}" = set; then
1047510488 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1047610489 lt_status=$lt_dlunknown
1047710490 cat > conftest.$ac_ext <
10478 #line 10479 "configure"
10491 #line 10492 "configure"
1047910492 #include "confdefs.h"
1048010493
1048110494 #if HAVE_DLFCN_H
2193621949 EXTRA_LD_OPTIONS!$EXTRA_LD_OPTIONS$ac_delim
2193721950 CLANG_SRC_ROOT!$CLANG_SRC_ROOT$ac_delim
2193821951 BINUTILS_INCDIR!$BINUTILS_INCDIR$ac_delim
21952 INTERNAL_PREFIX!$INTERNAL_PREFIX$ac_delim
2193921953 NM!$NM$ac_delim
2194021954 ifGNUmake!$ifGNUmake$ac_delim
2194121955 LN_S!$LN_S$ac_delim
2201622030 LTLIBOBJS!$LTLIBOBJS$ac_delim
2201722031 _ACEOF
2201822032
22019 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 90; then
22033 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 91; then
2202022034 break
2202122035 elif $ac_last_try; then
2202222036 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5