From 92080529a05e223303a75d83008f804fd518aba7 Mon Sep 17 00:00:00 2001 From: Jordan Rose Date: Mon, 1 Oct 2012 18:40:32 +0000 Subject: [PATCH] Re-enable support for --program-prefix. The Apple buildbots have been modified not to pass --target, so they shouldn't choke on a default program prefix anymore. Patch by Rick Foos! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164956 91177308-0d34-0410-b5e6-96231b3b80d8 --- Makefile.config.in | 1 + Makefile.rules | 4 ++-- autoconf/configure.ac | 5 +++++ configure | 10 ++++++++-- projects/sample/Makefile.llvm.rules | 4 ++-- tools/llvm-config/Makefile | 2 +- 6 files changed, 19 insertions(+), 7 deletions(-) diff --git a/Makefile.config.in b/Makefile.config.in index e3bd2a207a5..b4ecea631e3 100644 --- a/Makefile.config.in +++ b/Makefile.config.in @@ -61,6 +61,7 @@ endif prefix := @prefix@ PROJ_prefix := $(prefix) +program_prefix := @program_prefix@ PROJ_VERSION := $(LLVMVersion) else ifndef PROJ_SRC_ROOT diff --git a/Makefile.rules b/Makefile.rules index 289adc2be42..f74c6f5ada6 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -1541,7 +1541,7 @@ ToolBinDir = $(DESTDIR)$(PROJ_internal_prefix)/bin else ToolBinDir = $(DESTDIR)$(PROJ_bindir) endif -DestTool = $(ToolBinDir)/$(TOOLEXENAME) +DestTool = $(ToolBinDir)/$(program_prefix)$(TOOLEXENAME) install-local:: $(DestTool) @@ -1556,7 +1556,7 @@ uninstall-local:: # TOOLALIAS install. ifdef TOOLALIAS -DestToolAlias = $(ToolBinDir)/$(TOOLALIAS)$(EXEEXT) +DestToolAlias = $(ToolBinDir)/$(program_prefix)$(TOOLALIAS)$(EXEEXT) install-local:: $(DestToolAlias) diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 574a30cef9f..13b3db6200a 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -1709,6 +1709,11 @@ fi dnl OCaml findlib META file AC_CONFIG_FILES([bindings/ocaml/llvm/META.llvm]) +dnl Add --program-prefix value to Makefile.rules. Already an ARG variable. +test "x$program_prefix" = "xNONE" && program_prefix="" +AC_SUBST([program_prefix]) + + dnl Do special configuration of Makefiles AC_CONFIG_COMMANDS([setup],,[llvm_src="${srcdir}"]) AC_CONFIG_MAKEFILE(Makefile) diff --git a/configure b/configure index 1905537f4e1..e9ab6bc009e 100755 --- a/configure +++ b/configure @@ -790,6 +790,7 @@ OCAML_LIBDIR ENABLE_VISIBILITY_INLINES_HIDDEN RPATH RDYNAMIC +program_prefix LIBOBJS LTLIBOBJS' ac_subst_files='' @@ -10312,7 +10313,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&5 diff --git a/projects/sample/Makefile.llvm.rules b/projects/sample/Makefile.llvm.rules index a6553020f86..7ed1c1b4ed6 100644 --- a/projects/sample/Makefile.llvm.rules +++ b/projects/sample/Makefile.llvm.rules @@ -1437,7 +1437,7 @@ install-local:: uninstall-local:: $(Echo) Uninstall circumvented with NO_INSTALL else -DestTool = $(DESTDIR)$(PROJ_bindir)/$(TOOLEXENAME) +DestTool = $(DESTDIR)$(PROJ_bindir)/$(program_prefix)$(TOOLEXENAME) install-local:: $(DestTool) @@ -1451,7 +1451,7 @@ uninstall-local:: # TOOLALIAS install. ifdef TOOLALIAS -DestToolAlias = $(DESTDIR)$(PROJ_bindir)/$(TOOLALIAS)$(EXEEXT) +DestToolAlias = $(DESTDIR)$(PROJ_bindir)/$(program_prefix)$(TOOLALIAS)$(EXEEXT) install-local:: $(DestToolAlias) diff --git a/tools/llvm-config/Makefile b/tools/llvm-config/Makefile index e8c86929e18..b20b6bf4a4b 100644 --- a/tools/llvm-config/Makefile +++ b/tools/llvm-config/Makefile @@ -63,5 +63,5 @@ ifeq ($(LLVM_CROSS_COMPILING),1) install:: $(DESTDIR)$(PROJ_bindir) $(Echo) Installing llvm-config-host $(Verb) $(ProgInstall) $(BuildLLVMToolDir)/llvm-config \ - $(DESTDIR)$(PROJ_bindir)/llvm-config-host + $(DESTDIR)$(PROJ_bindir)/$(program_prefix)llvm-config-host endif -- 2.34.1