$NetBSD: patch-af,v 1.17 2005/10/11 17:19:21 jlam Exp $ --- Makefile.org.orig 2005-06-20 00:29:54.000000000 -0400 +++ Makefile.org @@ -28,6 +28,7 @@ INSTALLTOP=/usr/local/ssl # Do not edit this manually. Use Configure --openssldir=DIR do change this! OPENSSLDIR=/usr/local/ssl +EXAMPLEDIR=$(INSTALLTOP)/share/examples/openssl # NO_IDEA - Define to build without the IDEA algorithm # NO_RC4 - Define to build without the RC4 algorithm @@ -195,7 +196,7 @@ TESTS = alltests MAKEFILE= Makefile -MANDIR=$(OPENSSLDIR)/man +MANDIR=$(INSTALLTOP)/man MAN1=1 MAN3=3 MANSUFFIX= @@ -291,11 +292,13 @@ link-shared: tmp="$(SHARED_LIBS_LINK_EXTS)"; \ for i in $(SHLIBDIRS); do \ prev=lib$$i$(SHLIB_EXT); \ + if [ -f "$$prev" ]; then \ for j in $${tmp:-x}; do \ ( set -x; \ rm -f lib$$i$$j; ln -s $$prev lib$$i$$j ); \ prev=lib$$i$$j; \ done; \ + fi; \ done; \ fi @@ -310,8 +313,7 @@ do_gnu-shared: fi; \ ( set -x; ${CC} ${SHARED_LDFLAGS} \ -shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ - -Wl,-soname=lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ - -Wl,-Bsymbolic \ + -Wl,-h,lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ -Wl,--whole-archive lib$$i.a \ -Wl,--no-whole-archive $$libs ${EX_LIBS} ) || exit 1; \ libs="-l$$i $$libs"; \ @@ -427,6 +429,7 @@ do_solaris-shared: -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ -h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ -Wl,-Bsymbolic \ + -Wl,-R${INSTALLTOP}/lib \ $${MINUSZ}allextract lib$$i.a $${MINUSZ}defaultextract \ $$libs ${EX_LIBS} ) || exit 1; \ libs="-l$$i $$libs"; \ @@ -534,7 +537,7 @@ do_hpux-shared: # HP/UX-64bit: +forceload # AIX: -bnogc # SHAREDFLAGS would be: -# GNU systems: -shared -Wl,-soname=lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} +# GNU systems: -shared -Wl,-h,lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} # Tru64 Unix: -shared \ # -set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" # Solaris: -G -h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} @@ -771,16 +774,14 @@ dist: dist_pem_h: (cd crypto/pem; $(MAKE) CC='${CC}' SDIRS='${SDIRS}' CFLAG='${CFLAG}' pem.h; $(MAKE) clean) -install: all install_docs install_sw +install: install_docs install_sw install_sw: @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ $(INSTALL_PREFIX)$(INSTALLTOP)/lib \ $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig \ $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \ - $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \ - $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \ - $(INSTALL_PREFIX)$(OPENSSLDIR)/private + $(INSTALL_PREFIX)$(EXAMPLEDIR) @headerlist="$(EXHEADER)"; for i in $$headerlist ;\ do \ (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ @@ -875,35 +876,53 @@ install_docs: 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}$(MANSUFFIX)"; \ + case "$$fn" in \ + CA.pl|openssl) ofn="$$fn" ;; \ + *) ofn="openssl_$$fn" ;; \ + esac; \ + echo "installing man$$sec/$$ofn.$${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}$(MANSUFFIX); \ + > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$ofn.$${sec}$(MANSUFFIX); \ $(PERL) util/extract-names.pl < $$i | \ (grep -v $$filecase "^$$fn\$$"; true) | \ (grep -v "[ ]"; true) | \ (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \ while read n; do \ - $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \ + case "$$n" in \ + CA.pl|openssl) on="$$n" ;; \ + *) on="openssl_$$n" ;; \ + esac; \ + $$here/util/point.sh $$ofn.$${sec}$(MANSUFFIX) "$$on".$${sec}$(MANSUFFIX); \ done); \ done; \ 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}$(MANSUFFIX)"; \ + case "$$fn" in \ + ui*) ofn="openssl_$$fn" ;; \ + [A-Z]*|*_*) ofn="$$fn" ;; \ + *) ofn="openssl_$$fn" ;; \ + esac; \ + echo "installing man$$sec/$$ofn.$${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}$(MANSUFFIX); \ + > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$ofn.$${sec}$(MANSUFFIX); \ $(PERL) util/extract-names.pl < $$i | \ (grep -v $$filecase "^$$fn\$$"; true) | \ (grep -v "[ ]"; true) | \ (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \ while read n; do \ - $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \ + case "$$n" in \ + ui*) on="openssl_$$n" ;; \ + [A-Z]*|*_*) on="$$n" ;; \ + *) on="openssl_$$n" ;; \ + esac; \ + $$here/util/point.sh $$ofn.$${sec}$(MANSUFFIX) "$$on".$${sec}$(MANSUFFIX); \ done); \ done