diff options
author | sb <sb@openoffice.org> | 2009-12-18 16:01:47 +0100 |
---|---|---|
committer | sb <sb@openoffice.org> | 2009-12-18 16:01:47 +0100 |
commit | 93eb29213276ff5db32f9f6cde9416f97b3a5b02 (patch) | |
tree | e6fe3145c0067cbb3e8475eda0e03c528bfc6146 | |
parent | 142fb452faba13ab6f8c407ce4ed8c8b701a76f8 (diff) |
sb118: redesigned AUGMENT_LIBRARY_PATH to make the modified OOO_LIBRARY_PATH_VAR available (to mechanisms that want to recursively undo the modifications again)
-rw-r--r-- | solenv/inc/settings.mk | 19 | ||||
-rw-r--r-- | solenv/inc/unx.mk | 15 | ||||
-rw-r--r-- | solenv/inc/unxmacx.mk | 16 | ||||
-rw-r--r-- | solenv/inc/wnt.mk | 9 |
4 files changed, 24 insertions, 35 deletions
diff --git a/solenv/inc/settings.mk b/solenv/inc/settings.mk index d195f2f105e6..74989f0c6e82 100644 --- a/solenv/inc/settings.mk +++ b/solenv/inc/settings.mk @@ -1039,6 +1039,25 @@ LNTFLAGSOUTOBJ=-os .INCLUDE : os2.mk .ENDIF +.IF "$(OOO_LIBRARY_PATH_VAR)" != "" +# Add SOLARLIBDIR to the end of a (potentially previously undefined) library +# path (LD_LIBRARY_PATH, PATH, etc.; there is no real reason to prefer adding at +# the end over adding at the start); the ": &&" in the bash case enables this to +# work at the start of a recipe line that is not prefixed by "+" as well as in +# the middle of an existing && chain; the tcsh case is somewhat imprecise in +# that it potentially affects multiple commands following on the recipe line: +.IF "$(USE_SHELL)" == "bash" +AUGMENT_LIBRARY_PATH *= : && \ + $(OOO_LIBRARY_PATH_VAR)=$${{$(OOO_LIBRARY_PATH_VAR)+$${{$(OOO_LIBRARY_PATH_VAR)}}:}}$(SOLARLIBDIR) +.ELSE +AUGMENT_LIBRARY_PATH *= if ($$?$(OOO_LIBRARY_PATH_VAR) == 1) \ + eval 'setenv $(OOO_LIBRARY_PATH_VAR) \ + "$${{$(OOO_LIBRARY_PATH_VAR)}}:$(SOLARLIBDIR)"' \ + && if ($$?$(OOO_LIBRARY_PATH_VAR) == 0) \ + setenv $(OOO_LIBRARY_PATH_VAR) "$(SOLARLIBDIR)" && +.END +.END + # remove if .Net 2003 support has expired .IF "$(debug)"!="" .IF "$(OS)$(COM)$(CPU)" == "WNTMSCI" diff --git a/solenv/inc/unx.mk b/solenv/inc/unx.mk index bb5a4864484d..6a0fbe25f029 100644 --- a/solenv/inc/unx.mk +++ b/solenv/inc/unx.mk @@ -214,17 +214,4 @@ SOLARLIB+=-L$(KDE_ROOT)/lib .ENDIF # "$(KDE_ROOT)"!="" .ENDIF # "$(ENABLE_KDE)" != "" -# Add SOLARLIBDIR to the end of a (potentially previously undefined) -# LD_LIBRARY_PATH (there is no real reason to prefer adding at the end over -# adding at the start); the ": &&" in the bash case enables this to work at the -# start of a recipe line that is not prefixed by "+" as well as in the middle of -# an existing && chain; the tcsh case is somewhat imprecise in that it -# potentially affects multiple commands following on the recipe line: -.IF "$(USE_SHELL)" == "bash" -AUGMENT_LIBRARY_PATH *= : && \ - LD_LIBRARY_PATH=$${{LD_LIBRARY_PATH+$${{LD_LIBRARY_PATH}}:}}$(SOLARLIBDIR) -.ELSE -AUGMENT_LIBRARY_PATH *= if ($$?LD_LIBRARY_PATH == 1) \ - eval 'setenv LD_LIBRARY_PATH "$${{LD_LIBRARY_PATH}}:$(SOLARLIBDIR)"' && \ - if ($$?LD_LIBRARY_PATH == 0) setenv LD_LIBRARY_PATH "$(SOLARLIBDIR)" && -.ENDIF +OOO_LIBRARY_PATH_VAR *= LD_LIBRARY_PATH diff --git a/solenv/inc/unxmacx.mk b/solenv/inc/unxmacx.mk index 6cb113e7918b..c5a1a9d29976 100644 --- a/solenv/inc/unxmacx.mk +++ b/solenv/inc/unxmacx.mk @@ -289,18 +289,4 @@ RCLINK= RCLINKFLAGS= RCSETVERSION= -# Add SOLARLIBDIR to the end of a (potentially previously undefined) -# DYLD_LIBRARY_PATH (there is no real reason to prefer adding at the end over -# adding at the start); the ": &&" in the bash case enables this to work at the -# start of a recipe line that is not prefixed by "+" as well as in the middle of -# an existing && chain; the tcsh case is somewhat imprecise in that it -# potentially affects multiple commands following on the recipe line: -.IF "$(USE_SHELL)" == "bash" -AUGMENT_LIBRARY_PATH = : && \ - DYLD_LIBRARY_PATH=$${{DYLD_LIBRARY_PATH+$${{DYLD_LIBRARY_PATH}}:}}$(SOLARLIBDIR) -.ELSE -AUGMENT_LIBRARY_PATH = if ($$?DYLD_LIBRARY_PATH == 1) \ - eval 'setenv DYLD_LIBRARY_PATH "$${{DYLD_LIBRARY_PATH}}:$(SOLARLIBDIR)"' \ - && if ($$?DYLD_LIBRARY_PATH == 0) \ - setenv DYLD_LIBRARY_PATH "$(SOLARLIBDIR)" && -.ENDIF +OOO_LIBRARY_PATH_VAR = DYLD_LIBRARY_PATH diff --git a/solenv/inc/wnt.mk b/solenv/inc/wnt.mk index 6acab30cc80d..0b5772833580 100644 --- a/solenv/inc/wnt.mk +++ b/solenv/inc/wnt.mk @@ -73,9 +73,6 @@ JAVA_RUNTIME=javai_g.lib .ENDIF .ENDIF -.IF "$(USE_SHELL)" == "bash" -AUGMENT_LIBRARY_PATH *= : && \ - PATH=$${{PATH}}:$(SOLARBINDIR:s/://:^"/cygdrive/") -.ELSE -AUGMENT_LIBRARY_PATH *= echos && PATH=%PATH%;$(SOLARBINDIR) && -.ENDIF +OOO_LIBRARY_PATH_VAR = PATH +AUGMENT_LIBRARY_PATH = : && \ + $(OOO_LIBRARY_PATH_VAR)=$${{$(OOO_LIBRARY_PATH_VAR)+$${{$(OOO_LIBRARY_PATH_VAR)}}:}}$(SOLARBINDIR:s/://:^"/cygdrive/") |