The efforts to eliminate the dual-representation of zero and to ensure
[openssl.git] / Makefile.org
index 58c0807fbfd926a5a16a01a2dd46846f7e70737f..5c3e60ff0711c647fafb30456f1a58b3bf664f52 100644 (file)
@@ -78,7 +78,7 @@ MAKEDEPPROG=makedepend
 # gcc, then the driver will automatically translate it to -xarch=v8plus
 # and pass it down to assembler.
 AS=$(CC) -c
-ASFLAGS=$(CFLAG)
+ASFLAG=$(CFLAG)
 
 # Set BN_ASM to bn_asm.o if you want to use the C version
 BN_ASM= bn_asm.o
@@ -174,11 +174,13 @@ SHLIBDIRS= crypto ssl
 
 # dirs in crypto to build
 SDIRS=  \
+       objects \
        md2 md4 md5 sha mdc2 hmac ripemd \
        des rc2 rc4 rc5 idea bf cast \
        bn ec rsa dsa ecdsa dh ecdh dso engine aes \
-       buffer bio stack lhash rand err objects \
-       evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5
+       buffer bio stack lhash rand err \
+       evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 \
+       store
 
 # tests to perform.  "alltests" is a special word indicating that all tests
 # should be performed.
@@ -191,6 +193,7 @@ MAKE=     $(NEWMAKE) -f Makefile.ssl
 MANDIR=$(OPENSSLDIR)/man
 MAN1=1
 MAN3=3
+MANSUFFIX=
 SHELL=/bin/sh
 
 TOP=    .
@@ -217,7 +220,7 @@ all: Makefile.ssl build_all openssl.pc
 BUILD_CMD=if echo " $(DIRS) " | grep " $$i " >/dev/null 2>/dev/null; then \
        if [ -d "$$i" ]; then \
                (cd $$i && echo "making all in $$i..." && \
-               $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' AS='${AS}' ASFLAGS='${ASFLAGS}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' all ) || exit 1; \
+               $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' AS='${AS}' ASFLAG='${ASFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' all ) || exit 1; \
        else \
                $(MAKE) $$i; \
        fi; fi
@@ -255,7 +258,7 @@ libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
        fi
 
 clean-shared:
-       @for i in $(SHLIBDIRS); do \
+       @set -e; for i in $(SHLIBDIRS); do \
                if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
                        tmp="$(SHARED_LIBS_LINK_EXTS)"; \
                        for j in $${tmp:-x}; do \
@@ -269,7 +272,7 @@ clean-shared:
        done
 
 link-shared:
-       @ for i in ${SHLIBDIRS}; do \
+       @ set -e; for i in ${SHLIBDIRS}; do \
                $(NEWMAKE) -f $(HERE)/Makefile.shared \
                        LIBNAME=$$i LIBVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} \
                        LIBCOMPATVERSIONS=";${SHLIB_VERSION_HISTORY}" \
@@ -280,7 +283,7 @@ link-shared:
 build-shared: do_$(SHLIB_TARGET) link-shared
 
 do_$(SHLIB_TARGET):
-       @ libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
+       @ set -e; libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
                if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
                        libs="$(LIBKRB5) $$libs"; \
                fi; \
@@ -318,7 +321,7 @@ libclean:
 
 clean: libclean
        rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
-       @for i in $(DIRS) ;\
+       @set -e; for i in $(DIRS) ;\
        do \
        if [ -d "$$i" ]; then \
                (cd $$i && echo "making clean in $$i..." && \
@@ -329,7 +332,7 @@ clean:      libclean
        rm -f openssl.pc
        rm -f speed.* .pure
        rm -f $(TARFILE)
-       @for i in $(ONEDIRS) ;\
+       @set -e; for i in $(ONEDIRS) ;\
        do \
        rm -fr $$i/*; \
        done
@@ -340,7 +343,7 @@ makefile.one: files
 
 files:
        $(PERL) $(TOP)/util/files.pl Makefile.ssl > $(TOP)/MINFO
-       @for i in $(DIRS) ;\
+       @set -e; for i in $(DIRS) ;\
        do \
        if [ -d "$$i" ]; then \
                (cd $$i && echo "making 'files' in $$i..." && \
@@ -352,7 +355,7 @@ links:
        @$(TOP)/util/point.sh Makefile.ssl Makefile
        @$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
        @$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
-       @for i in $(DIRS); do \
+       @set -e; for i in $(DIRS); do \
        if [ -d "$$i" ]; then \
                (cd $$i && echo "making links in $$i..." && \
                $(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}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PERL='${PERL}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' links ) || exit 1; \
@@ -365,7 +368,7 @@ gentests:
 
 dclean:
        rm -f *.bak
-       @for i in $(DIRS) ;\
+       @set -e; for i in $(DIRS) ;\
        do \
        if [ -d "$$i" ]; then \
                (cd $$i && echo "making dclean in $$i..." && \
@@ -403,7 +406,7 @@ report:
        @$(PERL) util/selftest.pl
 
 depend:
-       @for i in $(DIRS) ;\
+       @set -e; for i in $(DIRS) ;\
        do \
        if [ -d "$$i" ]; then \
                (cd $$i && echo "making dependencies $$i..." && \
@@ -412,7 +415,7 @@ depend:
        done;
 
 lint:
-       @for i in $(DIRS) ;\
+       @set -e; for i in $(DIRS) ;\
        do \
        if [ -d "$$i" ]; then \
                (cd $$i && echo "making lint $$i..." && \
@@ -421,7 +424,7 @@ lint:
        done;
 
 tags:
-       @for i in $(DIRS) ;\
+       @set -e; for i in $(DIRS) ;\
        do \
        if [ -d "$$i" ]; then \
                (cd $$i && echo "making tags $$i..." && \
@@ -493,24 +496,24 @@ install: all install_docs
                $(INSTALL_PREFIX)$(INSTALLTOP)/lib \
                $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig \
                $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
-               $(INSTALL_PREFIX)$(OPENSSLDIR)/engines \
+               $(INSTALL_PREFIX)$(INSTALLTOP)/engines \
                $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
                $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
                $(INSTALL_PREFIX)$(OPENSSLDIR)/private \
                $(INSTALL_PREFIX)$(OPENSSLDIR)/lib
-       @for i in $(EXHEADER) ;\
+       @set -e; for i in $(EXHEADER) ;\
        do \
        (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
        chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
        done;
-       @for i in $(DIRS) ;\
+       @set -e; for i in $(DIRS) ;\
        do \
        if [ -d "$$i" ]; then \
                (cd $$i; echo "installing $$i..."; \
                $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' RANLIB='${RANLIB}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' install ); \
        fi; \
        done
-       @for i in $(LIBS) ;\
+       @set -e; for i in $(LIBS) ;\
        do \
                if [ -f "$$i" ]; then \
                (       echo installing $$i; \
@@ -520,7 +523,7 @@ install: all install_docs
                        mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
                fi; \
        done;
-       @if [ -n "$(SHARED_LIBS)" ]; then \
+       @set -e; if [ -n "$(SHARED_LIBS)" ]; then \
                tmp="$(SHARED_LIBS)"; \
                for i in $${tmp:-x}; \
                do \
@@ -552,6 +555,7 @@ install: all install_docs
                fi; \
        fi
        cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
+       chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig/openssl.pc
 
 install_docs:
        @$(PERL) $(TOP)/util/mkdir-p.pl \
@@ -565,36 +569,38 @@ install_docs:
        if [ "$(PLATFORM)" = "DJGPP" -o "$(PLATFORM)" = "Cygwin" ]; then \
                filecase=-i; \
        fi; \
-       for i in doc/apps/*.pod; do \
+       set -e; for i in doc/apps/*.pod; do \
                fn=`basename $$i .pod`; \
                if [ "$$fn" = "config" ]; then sec=5; else sec=1; fi; \
-               echo "installing man$$sec/$$fn.$$sec"; \
+               echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
                (cd `$(PERL) util/dirname.pl $$i`; \
                sh -c "$$pod2man \
                        --section=$$sec --center=OpenSSL \
                        --release=$(VERSION) `basename $$i`") \
-                       >  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$$sec; \
+                       >  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
                $(PERL) util/extract-names.pl < $$i | \
                        grep -v $$filecase "^$$fn\$$" | \
+                       grep -v "[      ]" | \
                        (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
                         while read n; do \
-                               $$here/util/point.sh $$fn.$$sec $$n.$$sec; \
+                               $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
                         done); \
        done; \
-       for i in doc/crypto/*.pod doc/ssl/*.pod; do \
+       set -e; for i in doc/crypto/*.pod doc/ssl/*.pod; do \
                fn=`basename $$i .pod`; \
                if [ "$$fn" = "des_modes" ]; then sec=7; else sec=3; fi; \
-               echo "installing man$$sec/$$fn.$$sec"; \
+               echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
                (cd `$(PERL) util/dirname.pl $$i`; \
                sh -c "$$pod2man \
                        --section=$$sec --center=OpenSSL \
                        --release=$(VERSION) `basename $$i`") \
-                       >  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$$sec; \
+                       >  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
                $(PERL) util/extract-names.pl < $$i | \
                        grep -v $$filecase "^$$fn\$$" | \
+                       grep -v "[      ]" | \
                        (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
                         while read n; do \
-                               $$here/util/point.sh $$fn.$$sec $$n.$$sec; \
+                               $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
                         done); \
        done