Some find it confusing that environment variables are set when shared
[openssl.git] / Makefile.org
index a381960..8059909 100644 (file)
@@ -403,18 +403,20 @@ dclean:
 rehash: rehash.time
 rehash.time: certs
        @(OPENSSL="`pwd`/apps/openssl$(EXE_EXT)"; OPENSSL_DEBUG_MEMORY=on; \
-               export OPENSSL OPENSSL_DEBUG_MEMORY; \
-               LD_LIBRARY_PATH="`pwd`:$$LD_LIBRARY_PATH"; \
-               DYLD_LIBRARY_PATH="`pwd`:$$DYLD_LIBRARY_PATH"; \
-               SHLIB_PATH="`pwd`:$$SHLIB_PATH"; \
-               LIBPATH="`pwd`:$$LIBPATH"; \
-               if [ "$(PLATFORM)" = "Cygwin" ]; then PATH="`pwd`:$$PATH"; fi; \
-               export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; \
-               if [ -n "$(SHARED_LIBS)" ]; then \
-                 LD_PRELOAD="$$OSSL_LIBPATH/libssl.so $$OSSL_LIBPATH/libcrypto.so"; \
-                 export LD_PRELOAD; \
-               fi; \
-               $(PERL) tools/c_rehash certs)
+         export OPENSSL OPENSSL_DEBUG_MEMORY; \
+         if [ -n "$(SHARED_LIBS)" ]; then \
+           LD_LIBRARY_PATH="`pwd`:$$LD_LIBRARY_PATH"; \
+           DYLD_LIBRARY_PATH="`pwd`:$$DYLD_LIBRARY_PATH"; \
+           SHLIB_PATH="`pwd`:$$SHLIB_PATH"; \
+           LIBPATH="`pwd`:$$LIBPATH"; \
+           if [ "$(PLATFORM)" = "Cygwin" ]; then \
+             PATH="`pwd`:$$PATH"; \
+           fi; \
+           LD_PRELOAD="$$OSSL_LIBPATH/libssl.so $$OSSL_LIBPATH/libcrypto.so"; \
+           export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; \
+           export LD_PRELOAD; \
+         fi; \
+         $(PERL) tools/c_rehash certs)
        touch rehash.time
 
 test:   tests
@@ -422,14 +424,14 @@ test:   tests
 tests: rehash
        @(cd test && echo "testing..." && \
        $(MAKE) $(BUILDENV) TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on tests );
-       @LD_LIBRARY_PATH="`pwd`:$$LD_LIBRARY_PATH"; \
-       DYLD_LIBRARY_PATH="`pwd`:$$DYLD_LIBRARY_PATH"; \
-       SHLIB_PATH="`pwd`:$$SHLIB_PATH"; \
-       LIBPATH="`pwd`:$$LIBPATH"; \
-       if [ "$(PLATFORM)" = "Cygwin" ]; then PATH="`pwd`:$$PATH"; fi; \
-       export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; \
-       if [ -n "$(SHARED_LIBS)" ]; then \
+       @if [ -n "$(SHARED_LIBS)" ]; then \
+         LD_LIBRARY_PATH="`pwd`:$$LD_LIBRARY_PATH"; \
+         DYLD_LIBRARY_PATH="`pwd`:$$DYLD_LIBRARY_PATH"; \
+         SHLIB_PATH="`pwd`:$$SHLIB_PATH"; \
+         LIBPATH="`pwd`:$$LIBPATH"; \
+         if [ "$(PLATFORM)" = "Cygwin" ]; then PATH="`pwd`:$$PATH"; fi; \
          LD_PRELOAD="$$OSSL_LIBPATH/libssl.so $$OSSL_LIBPATH/libcrypto.so"; \
+         export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; \
          export LD_PRELOAD; \
        fi; \
        apps/openssl version -a