Some find it confusing that environment variables are set when shared
authorRichard Levitte <levitte@openssl.org>
Thu, 11 Nov 2004 18:18:10 +0000 (18:18 +0000)
committerRichard Levitte <levitte@openssl.org>
Thu, 11 Nov 2004 18:18:10 +0000 (18:18 +0000)
libraries aren't built or used.  I can see the point, so I'm
reorganising a little for clarity.

Makefile.org
apps/Makefile
test/Makefile

index 2a6eb9ad95d54c193ef62b7a4202bde8f062aee3..0b661ab729d23fd476e5f9cc2c984102ff470578 100644 (file)
@@ -680,18 +680,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
@@ -699,14 +701,14 @@ test:   tests
 tests: rehash
        @(cd test && echo "testing..." && \
        $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' 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
index e0cb60a47b288ed961008b1264cb9d6fc0e67405..8759433e9010bbdafb2b40da30017b4fceafcf42 100644 (file)
@@ -152,18 +152,21 @@ $(EXE): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL)
        if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \
                TOP=$(TOP) $(TOP)/fips/openssl_fips_fingerprint $(TOP)/libcrypto.a $(EXE); \
        fi
-       -(cd ..; OPENSSL="`pwd`/apps/$(EXE)"; export OPENSSL; \
-               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)
+       -(cd ..; 
+         if [ -n "$(SHARED_LIBS)" ]; then \
+           OPENSSL="`pwd`/apps/$(EXE)"; export OPENSSL; \
+           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)
 
 progs.h: progs.pl
        $(PERL) progs.pl $(E_EXE) >progs.h
index aedd016f3f661f1655520d45b3c606dd51db168b..6f5190f7e1f599c87d0dc1251c68d753bf6d0401 100644 (file)
@@ -124,17 +124,20 @@ tests:    exe apps $(TESTS)
 apps:
        @(cd ..; $(MAKE) DIRS=apps all)
 
-SET_SO_PATHS=OSSL_LIBPATH="`cd ..; pwd`"; \
-               LD_LIBRARY_PATH="$$OSSL_LIBPATH:$$LD_LIBRARY_PATH"; \
-               DYLD_LIBRARY_PATH="$$OSSL_LIBPATH:$$DYLD_LIBRARY_PATH"; \
-               SHLIB_PATH="$$OSSL_LIBPATH:$$SHLIB_PATH"; \
-               LIBPATH="$$OSSL_LIBPATH:$$LIBPATH"; \
-               if [ "$(PLATFORM)" = "Cygwin" ]; then PATH="$${LIBPATH}:$$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
+SET_SO_PATHS=\
+       if [ -n "$(SHARED_LIBS)" ]; then \
+         OSSL_LIBPATH="`cd ..; pwd`"; \
+         LD_LIBRARY_PATH="$$OSSL_LIBPATH:$$LD_LIBRARY_PATH"; \
+         DYLD_LIBRARY_PATH="$$OSSL_LIBPATH:$$DYLD_LIBRARY_PATH"; \
+         SHLIB_PATH="$$OSSL_LIBPATH:$$SHLIB_PATH"; \
+         LIBPATH="$$OSSL_LIBPATH:$$LIBPATH"; \
+         if [ "$(PLATFORM)" = "Cygwin" ]; then \
+           PATH="$${LIBPATH}:$$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
 
 alltests: \
        test_des test_idea test_sha test_md4 test_md5 test_hmac \