From df3e4473fd07ee1fcb60d3afc0b6890d0f529484 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Wed, 2 Jan 2002 19:01:12 +0000 Subject: [PATCH] incorporate fixes from Joerg Walter [SVN r12200] --- boost-base.jam | 38 ++++++++++++++++++++++++++++++++++---- intel-linux-tools.jam | 7 ++++++- v1/boost-base.jam | 38 ++++++++++++++++++++++++++++++++++---- v1/intel-linux-tools.jam | 7 ++++++- 4 files changed, 80 insertions(+), 10 deletions(-) diff --git a/boost-base.jam b/boost-base.jam index c3bd0ad00..e4c27377f 100644 --- a/boost-base.jam +++ b/boost-base.jam @@ -141,6 +141,10 @@ rule Link-EXE # N.B. By the time this rule is invoked, we had better have gRUN_PATH completely set. Link-action $(<) : $(>) : EXE ; RUN_PATH on $(<) = [ join $(gRUN_PATH($(<))) $(RUN_PATH) : $(SPLITPATH) ] ; + if $(UNIX) + { + RUN_LD_LIBRARY_PATH on $(<) = [ join $(gRUN_LD_LIBRARY_PATH($(<))) $(RUN_LD_LIBRARY_PATH) : $(SPLITPATH) ] ; + } } rule Link-DLL @@ -152,6 +156,10 @@ rule Link-DLL } gRUN_PATH($(<)) += $(gLOCATE($(<[1]))) ; + if $(UNIX) + { + gRUN_LD_LIBRARY_PATH($(<)) += $(gLOCATE($(<[1]))) ; + } Link-action $(<) : $(>) : DLL ; } @@ -159,6 +167,10 @@ rule Link-DLL # This also allows the user to customize the base path for running built # products from the command-line RUN_PATH ?= $(PATH) ; +if $(UNIX) +{ + RUN_LD_LIBRARY_PATH ?= $(LD_LIBRARY_PATH) ; +} if $(NT) { # Try some other likely spellings @@ -167,13 +179,31 @@ if $(NT) } # Now set this, just in case someone tries to use it. PATH = $(RUN_PATH) ; +if $(UNIX) +{ + LD_LIBRARY_PATH = $(RUN_LD_LIBRARY_PATH) ; +} # A simple action to run an executable target -actions Run +if $(UNIX) { - $(SHELL_SET)PATH=$(RUN_PATH) - $(SHELL_EXPORT)PATH - $(<) $(COMMAND-LINE) + actions Run + { + $(SHELL_SET)PATH=$(RUN_PATH) + $(SHELL_EXPORT)PATH + $(SHELL_SET)LD_LIBRARY_PATH=$(RUN_LD_LIBRARY_PATH) + $(SHELL_EXPORT)LD_LIBRARY_PATH + $(<) $(COMMAND-LINE) + } +} +else +{ + actions Run + { + $(SHELL_SET)PATH=$(RUN_PATH) + $(SHELL_EXPORT)PATH + $(<) $(COMMAND-LINE) + } } # bubble variable-name diff --git a/intel-linux-tools.jam b/intel-linux-tools.jam index 1b6576a99..0b3df0066 100644 --- a/intel-linux-tools.jam +++ b/intel-linux-tools.jam @@ -12,8 +12,12 @@ if ! $(IA32ROOT) # Compiler version INTEL_LINUX_VERSION ?= "50" ; } +# Root directory +INTEL_LINUX_ROOT = "/opt/intel/compiler"$(INTEL_LINUX_VERSION) ; # Setup script -INTEL_LINUX_SETUP = ". /opt/intel/compiler"$(INTEL_LINUX_VERSION)"/ia32/bin/iccvars.sh" ; +INTEL_LINUX_SETUP = ". "$(INTEL_LINUX_ROOT)"/ia32/bin/iccvars.sh" ; +# Additional DLL directory +INTEL_LINUX_RUN_LD_LIBRARY_PATH = $(INTEL_LINUX_ROOT)"/ia32/lib" ; #### compiler and linker switches #### @@ -103,6 +107,7 @@ actions updated together piecemeal intel-linux-Archive-action rule Link-action { + gRUN_LD_LIBRARY_PATH($(<)) += $(INTEL_LINUX_RUN_LD_LIBRARY_PATH) ; intel-linux-Link-action $(<) : $(>) ; } diff --git a/v1/boost-base.jam b/v1/boost-base.jam index c3bd0ad00..e4c27377f 100644 --- a/v1/boost-base.jam +++ b/v1/boost-base.jam @@ -141,6 +141,10 @@ rule Link-EXE # N.B. By the time this rule is invoked, we had better have gRUN_PATH completely set. Link-action $(<) : $(>) : EXE ; RUN_PATH on $(<) = [ join $(gRUN_PATH($(<))) $(RUN_PATH) : $(SPLITPATH) ] ; + if $(UNIX) + { + RUN_LD_LIBRARY_PATH on $(<) = [ join $(gRUN_LD_LIBRARY_PATH($(<))) $(RUN_LD_LIBRARY_PATH) : $(SPLITPATH) ] ; + } } rule Link-DLL @@ -152,6 +156,10 @@ rule Link-DLL } gRUN_PATH($(<)) += $(gLOCATE($(<[1]))) ; + if $(UNIX) + { + gRUN_LD_LIBRARY_PATH($(<)) += $(gLOCATE($(<[1]))) ; + } Link-action $(<) : $(>) : DLL ; } @@ -159,6 +167,10 @@ rule Link-DLL # This also allows the user to customize the base path for running built # products from the command-line RUN_PATH ?= $(PATH) ; +if $(UNIX) +{ + RUN_LD_LIBRARY_PATH ?= $(LD_LIBRARY_PATH) ; +} if $(NT) { # Try some other likely spellings @@ -167,13 +179,31 @@ if $(NT) } # Now set this, just in case someone tries to use it. PATH = $(RUN_PATH) ; +if $(UNIX) +{ + LD_LIBRARY_PATH = $(RUN_LD_LIBRARY_PATH) ; +} # A simple action to run an executable target -actions Run +if $(UNIX) { - $(SHELL_SET)PATH=$(RUN_PATH) - $(SHELL_EXPORT)PATH - $(<) $(COMMAND-LINE) + actions Run + { + $(SHELL_SET)PATH=$(RUN_PATH) + $(SHELL_EXPORT)PATH + $(SHELL_SET)LD_LIBRARY_PATH=$(RUN_LD_LIBRARY_PATH) + $(SHELL_EXPORT)LD_LIBRARY_PATH + $(<) $(COMMAND-LINE) + } +} +else +{ + actions Run + { + $(SHELL_SET)PATH=$(RUN_PATH) + $(SHELL_EXPORT)PATH + $(<) $(COMMAND-LINE) + } } # bubble variable-name diff --git a/v1/intel-linux-tools.jam b/v1/intel-linux-tools.jam index 1b6576a99..0b3df0066 100644 --- a/v1/intel-linux-tools.jam +++ b/v1/intel-linux-tools.jam @@ -12,8 +12,12 @@ if ! $(IA32ROOT) # Compiler version INTEL_LINUX_VERSION ?= "50" ; } +# Root directory +INTEL_LINUX_ROOT = "/opt/intel/compiler"$(INTEL_LINUX_VERSION) ; # Setup script -INTEL_LINUX_SETUP = ". /opt/intel/compiler"$(INTEL_LINUX_VERSION)"/ia32/bin/iccvars.sh" ; +INTEL_LINUX_SETUP = ". "$(INTEL_LINUX_ROOT)"/ia32/bin/iccvars.sh" ; +# Additional DLL directory +INTEL_LINUX_RUN_LD_LIBRARY_PATH = $(INTEL_LINUX_ROOT)"/ia32/lib" ; #### compiler and linker switches #### @@ -103,6 +107,7 @@ actions updated together piecemeal intel-linux-Archive-action rule Link-action { + gRUN_LD_LIBRARY_PATH($(<)) += $(INTEL_LINUX_RUN_LD_LIBRARY_PATH) ; intel-linux-Link-action $(<) : $(>) ; }