X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=Makefile.in;h=cc2c0b520db96a4cac5a34624665a7db2790d0c2;hp=06413f3e33cf52a64c6c8feac04eb688fad38b12;hb=2fa2d15ac87645959be4cf736d2169fa5be12c9e;hpb=7984f082d5045b3a44839b74e4c72877b71ca48f diff --git a/Makefile.in b/Makefile.in index 06413f3e33..cc2c0b520d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -21,15 +21,45 @@ SHLIB_TARGET={- $target{shared_target} -} # and should probably not be bothered with at all. HERE=. -# INSTALL_PREFIX is for package builders so that they can configure +# DESTDIR is for package builders so that they can configure # for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/. # Normally it is left empty. -INSTALL_PREFIX={- $config{install_prefix} -} +DESTDIR= # Do not edit these manually. Use Configure with --prefix or --openssldir # to change this! Short explanation in the top comment in Configure -INSTALLTOP={- $config{prefix} -} -OPENSSLDIR={- $config{openssldir} -} +INSTALLTOP={- # $prefix is used in the OPENSSLDIR perl snippet + # + our $prefix = $config{prefix} || "/usr/local"; + $prefix -} +OPENSSLDIR={- # + # The logic here is that if no --openssldir was given, + # OPENSSLDIR will get the value from $prefix plus "/ssl". + # If --openssldir was given and the value is an absolute + # path, OPENSSLDIR will get its value without change. + # If the value from --openssldir is a relative path, + # OPENSSLDIR will get $prefix with the --openssldir + # value appended as a subdirectory. + # + use File::Spec::Functions; + our $openssldir = + $config{openssldir} ? + (file_name_is_absolute($config{openssldir}) ? + $config{openssldir} + : catdir($prefix, $config{openssldir})) + : catdir($prefix, "ssl"); + $openssldir -} +LIBDIR={- # + # if $prefix/lib$target{multilib} is not an existing + # directory, then assume that it's not searched by linker + # automatically, in which case adding $target{multilib} suffix + # causes more grief than we're ready to tolerate, so don't... + our $multilib = + -d "$prefix/lib$target{multilib}" ? $target{multilib} : ""; + our $libdir = $config{libdir} || "lib$multilib"; + $libdir -} +ENGINESDIR={- use File::Spec::Functions; + catdir($prefix,$libdir,"engines") -} # NO_IDEA - Define to build without the IDEA algorithm # NO_RC4 - Define to build without the RC4 algorithm @@ -46,7 +76,7 @@ OPENSSLDIR={- $config{openssldir} -} # NULL encryption ciphers. # # LOCK_DEBUG - turns on lots of lock debug output :-) -# REF_CHECK - turn on some xyz_free() assertions. +# REF_DEBUG - turn on some xyz_free() assertions. # REF_PRINT - prints some stuff on structure free. # MFUNC - Make all Malloc/Free/Realloc calls call # CRYPTO_malloc/CRYPTO_free/CRYPTO_realloc which can be setup to @@ -60,8 +90,9 @@ OPENSSLDIR={- $config{openssldir} -} CROSS_COMPILE= {- $config{cross_compile_prefix} -} CC= $(CROSS_COMPILE){- $target{cc} -} -CFLAG= {- $config{cflags} -} -DEPFLAG= {- $config{depflags} -} +CFLAG={- our $cflags2 = join(" ",(map { "-D".$_} @{$config{defines}}),"-DOPENSSLDIR=\"\\\"\$(OPENSSLDIR)\\\"\"","-DENGINESDIR=\"\\\"\$(ENGINESDIR)\\\"\"") -} {- $config{cflags} -} +CFLAG_Q={- $cflags2 =~ s|([\\"])|\\$1|g; $cflags2 -} {- $config{cflags} -} +DEPFLAG= {- join(" ",map { "-D".$_} @{$config{depdefines}}) -} LDFLAG= {- $config{lflags} -} PLIB_LDFLAG= {- $config{plib_lflags} -} EX_LIBS= {- $config{ex_libs} -} @@ -75,7 +106,7 @@ PERL= {- $config{perl} -} RM= rm -f TAR= tar TARFLAGS= --no-recursion -LIBDIR={- $config{libdir} -} +MAKEDEPPROG=$(CROSS_COMPILE){- $config{makedepprog} -} # We let the C compiler driver to take care of .s files. This is done in # order to be excused from maintaining a separate set of architecture @@ -160,7 +191,21 @@ LIBS= libcrypto.a libssl.a SHARED_CRYPTO=libcrypto$(SHLIB_EXT) SHARED_SSL=libssl$(SHLIB_EXT) SHARED_LIBS={- '$(SHARED_CRYPTO) $(SHARED_SSL)' if (!$config{no_shared}) -} -SHARED_LDFLAG={- $target{shared_ldflag} -} +SHARED_LDFLAG={- $target{shared_ldflag} + # Unlike other OSes (like Solaris, Linux, Tru64, + # IRIX) BSD run-time linkers (tested OpenBSD, NetBSD + # and FreeBSD) "demand" RPATH set on .so objects. + # Apparently application RPATH is not global and + # does not apply to .so linked with other .so. + # Problem manifests itself when libssl.so fails to + # load libcrypto.so. One can argue that we should + # engrave this into Makefile.shared rules or into + # BSD-* config lines above. Meanwhile let's try to + # be cautious and pass -rpath to linker only when + # $prefix is not /usr. + . ($config{target} =~ m|^BSD-| && $prefix !~ m|^/usr/.*$| + ? " -Wl,-rpath,\$\$(LIBRPATH)" : "") -} +SHARED_RCFLAG={- $target{shared_rcflag} -} GENERAL= Makefile BASENAME= openssl @@ -170,16 +215,16 @@ HEADER= e_os.h # Directories created on install if they don't exist. INSTALLDIRS= \ - $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ - $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \ - $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \ - $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \ - $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \ - $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \ - $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \ - $(INSTALL_PREFIX)$(OPENSSLDIR)/private + $(DESTDIR)$(INSTALLTOP)/bin \ + $(DESTDIR)$(INSTALLTOP)/$(LIBDIR) \ + $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines \ + $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \ + $(DESTDIR)$(INSTALLTOP)/include/openssl \ + $(DESTDIR)$(OPENSSLDIR)/misc \ + $(DESTDIR)$(OPENSSLDIR)/certs \ + $(DESTDIR)$(OPENSSLDIR)/private -all: Makefile build_all +all: Makefile build_all_but_tests # as we stick to -e, CLEARENV ensures that local variables in lower # Makefiles remain local and variable. $${VAR+VAR} is tribute to Korn @@ -200,17 +245,18 @@ CLEARENV= TOP= && unset TOP $${LIB+LIB} $${LIBS+LIBS} \ # LC_ALL=C ensures that error [and other] messages are delivered in # same language for uniform treatment. BUILDENV= LC_ALL=C PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)'\ - CC='$(CC)' CFLAG='$(CFLAG)' \ + CC='$(CC)' CFLAG='$(CFLAG)' CFLAG_Q='$(CFLAG_Q)' \ AS='$(CC)' ASFLAG='$(CFLAG) -c' \ AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)' \ CROSS_COMPILE='$(CROSS_COMPILE)' \ PERL='$(PERL)' \ SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)' \ - INSTALL_PREFIX='$(INSTALL_PREFIX)' \ + DESTDIR='$(DESTDIR)' \ INSTALLTOP='$(INSTALLTOP)' OPENSSLDIR='$(OPENSSLDIR)' \ LIBDIR='$(LIBDIR)' \ DEPFLAG='$(DEPFLAG)' \ SHARED_LDFLAG='$(SHARED_LDFLAG)' \ + SHARED_RCFLAG='$(SHARED_RCFLAG)' \ ZLIB_INCLUDE='$(ZLIB_INCLUDE)' LIBZLIB='$(LIBZLIB)' \ EXE_EXT='$(EXE_EXT)' SHARED_LIBS='$(SHARED_LIBS)' \ SHLIB_EXT='$(SHLIB_EXT)' SHLIB_TARGET='$(SHLIB_TARGET)' \ @@ -265,7 +311,8 @@ reflect: sub_all: build_all -build_all: build_libs build_apps build_tests build_tools +build_all_but_tests: build_libs build_apps build_tools +build_all: build_all_but_tests build_tests build_libs: build_libcrypto build_libssl openssl.pc @@ -329,6 +376,23 @@ do_$(SHLIB_TARGET): LIBDEPS="$$libs $(EX_LIBS)" \ link_a.$(SHLIB_TARGET); \ libs="-l$$i $$libs"; \ + case "$(PLATFORM)" in \ + Cygwin*) \ + rm -f apps/cyg$$i-$(SHLIB_MAJOR).$(SHLIB_MINOR).dll; \ + rm -f test/cyg$$i-$(SHLIB_MAJOR).$(SHLIB_MINOR).dll; \ + cp cyg$$i-$(SHLIB_MAJOR).$(SHLIB_MINOR).dll apps/; \ + cp cyg$$i-$(SHLIB_MAJOR).$(SHLIB_MINOR).dll test/; \ + ;; \ + mingw*) \ + case $$i in \ + crypto) i=libeay32;; \ + ssl) i=ssleay32;; \ + esac; \ + rm -f apps/$$i.dll; \ + rm -f test/$$i.dll; \ + cp $$i.dll apps/; \ + cp $$i.dll test/; \ + esac; \ done libcrypto.pc: Makefile @@ -414,7 +478,7 @@ rehash.time: certs build_apps build_tools test: files tests -tests: rehash +tests: build_tests rehash @(cd test && echo "testing..." && \ $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf tests ); @if [ -z "$(CROSS_COMPILE)" ]; then \ @@ -502,18 +566,18 @@ uninstall: uninstall_sw uninstall_docs install_sw: @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALLDIRS) @set -e; for i in include/openssl/*.h; do \ - (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$$i; \ - chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$$i ); \ + (cp $$i $(DESTDIR)$(INSTALLTOP)/$$i; \ + chmod 644 $(DESTDIR)$(INSTALLTOP)/$$i ); \ done; @set -e; target=install; for dir in $(INSTALL_SUBS); do $(BUILD_CMD); done @set -e; liblist="$(LIBS)"; for i in $$liblist ;\ do \ if [ -f "$$i" ]; then \ ( echo installing $$i; \ - cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ - $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ - chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ - mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i ); \ + cp $$i $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ + $(RANLIB) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ + chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ + mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i ); \ fi; \ done; @set -e; if [ -n "$(SHARED_LIBS)" ]; then \ @@ -524,16 +588,16 @@ install_sw: ( echo installing $$i; \ if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \ c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \ - cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \ - chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \ - mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \ - cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ - chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ - mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \ + cp $$c $(DESTDIR)$(INSTALLTOP)/bin/$$c.new; \ + chmod 755 $(DESTDIR)$(INSTALLTOP)/bin/$$c.new; \ + mv -f $(DESTDIR)$(INSTALLTOP)/bin/$$c.new $(DESTDIR)$(INSTALLTOP)/bin/$$c; \ + cp $$i $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ + chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ + mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i; \ else \ - cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ - chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ - mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \ + cp $$i $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ + chmod 555 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ + mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i; \ fi ); \ if expr $(PLATFORM) : 'mingw' > /dev/null; then \ ( case $$i in \ @@ -541,34 +605,34 @@ install_sw: *ssl*) i=ssleay32.dll;; \ esac; \ echo installing $$i; \ - cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \ - chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \ - mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \ + cp $$i $(DESTDIR)$(INSTALLTOP)/bin/$$i.new; \ + chmod 755 $(DESTDIR)$(INSTALLTOP)/bin/$$i.new; \ + mv -f $(DESTDIR)$(INSTALLTOP)/bin/$$i.new $(DESTDIR)$(INSTALLTOP)/bin/$$i ); \ fi; \ fi; \ done; \ ( here="`pwd`"; \ - cd $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR); \ + cd $(DESTDIR)$(INSTALLTOP)/$(LIBDIR); \ $(MAKE) -f $$here/Makefile HERE="$$here" link-shared ); \ if [ "$(INSTALLTOP)" != "/usr" ]; then \ echo 'OpenSSL shared libraries have been installed in:'; \ echo ' $(INSTALLTOP)'; \ fi; \ fi - cp libcrypto.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig - chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc - cp libssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig - chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc - cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig - chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc + cp libcrypto.pc $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig + chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc + cp libssl.pc $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig + chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc + cp openssl.pc $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig + chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc uninstall_sw: - cd include/openssl && files=* && cd $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl && $(RM) $$files + cd include/openssl && files=* && cd $(DESTDIR)$(INSTALLTOP)/include/openssl && $(RM) $$files @for i in $(LIBS) ;\ do \ test -f "$$i" && \ - echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i && \ - $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \ + echo $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i && \ + $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i; \ done; @if [ -n "$(SHARED_LIBS)" ]; then \ tmp="$(SHARED_LIBS)"; \ @@ -577,28 +641,28 @@ uninstall_sw: if [ -f "$$i" -o -f "$$i.a" ]; then \ if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \ c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \ - echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \ - $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \ - echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \ - $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \ + echo $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$c; \ + $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$c; \ + echo $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i; \ + $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i; \ else \ - echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \ - $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \ + echo $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i; \ + $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i; \ fi; \ if expr $(PLATFORM) : 'mingw' > /dev/null; then \ case $$i in \ *crypto*) i=libeay32.dll;; \ *ssl*) i=ssleay32.dll;; \ esac; \ - echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \ - $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \ + echo $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$i; \ + $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$i; \ fi; \ fi; \ done; \ fi - $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc - $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc - $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc + $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc + $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc + $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc @target=uninstall; $(RECURSIVE_BUILD_CMD) install_html_docs: @@ -608,7 +672,7 @@ install_html_docs: filecase=-i; \ esac; \ for subdir in apps crypto ssl; do \ - $(PERL) $(TOP)/util/mkdir-p $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \ + $(PERL) $(TOP)/util/mkdir-p $(DESTDIR)$(HTMLDIR)/$$subdir; \ for i in doc/$$subdir/*.pod; do \ fn=`basename $$i .pod`; \ echo "installing html/$$fn.$(HTMLSUFFIX)"; \ @@ -616,10 +680,10 @@ install_html_docs: | sed -r 's/L<([^)]*)(\([0-9]\))?\|([^)]*)(\([0-9]\))?>/L<\1|\3>/g' \ | pod2html --podroot=doc --htmlroot=.. --podpath=$$subdir:apps:crypto:ssl \ | sed -r 's/ $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \ + > $(DESTDIR)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \ $(PERL) util/extract-names.pl < $$i | \ grep -v $$filecase "^$$fn\$$" | \ - (cd $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \ + (cd $(DESTDIR)$(HTMLDIR)/$$subdir; \ while read n; do \ PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$(HTMLSUFFIX) "$$n".$(HTMLSUFFIX); \ done); \ @@ -635,21 +699,21 @@ uninstall_html_docs: for subdir in apps crypto ssl; do \ for i in doc/$$subdir/*.pod; do \ fn=`basename $$i .pod`; \ - $(RM) $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \ + $(RM) $(DESTDIR)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \ $(PERL) util/extract-names.pl < $$i | \ grep -v $$filecase "^$$fn\$$" | \ while read n; do \ - $(RM) $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/"$$n".$(HTMLSUFFIX); \ + $(RM) $(DESTDIR)$(HTMLDIR)/$$subdir/"$$n".$(HTMLSUFFIX); \ done; \ done; \ done install_docs: @$(PERL) $(TOP)/util/mkdir-p.pl \ - $(INSTALL_PREFIX)$(MANDIR)/man1 \ - $(INSTALL_PREFIX)$(MANDIR)/man3 \ - $(INSTALL_PREFIX)$(MANDIR)/man5 \ - $(INSTALL_PREFIX)$(MANDIR)/man7 + $(DESTDIR)$(MANDIR)/man1 \ + $(DESTDIR)$(MANDIR)/man3 \ + $(DESTDIR)$(MANDIR)/man5 \ + $(DESTDIR)$(MANDIR)/man7 here="`pwd`"; \ filecase=; \ case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \ @@ -663,11 +727,11 @@ install_docs: pod2man \ --section=$$sec --center=OpenSSL \ --release=$(VERSION) `basename $$i`) \ - > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ + > $(DESTDIR)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ $(PERL) util/extract-names.pl < $$i | \ (grep -v $$filecase "^$$fn\$$"; true) | \ (grep -v "[ ]"; true) | \ - (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \ + (cd $(DESTDIR)$(MANDIR)/man$$sec/; \ while read n; do \ PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \ done); \ @@ -680,11 +744,11 @@ install_docs: pod2man \ --section=$$sec --center=OpenSSL \ --release=$(VERSION) `basename $$i`) \ - > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ + > $(DESTDIR)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ $(PERL) util/extract-names.pl < $$i | \ (grep -v $$filecase "^$$fn\$$"; true) | \ (grep -v "[ ]"; true) | \ - (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \ + (cd $(DESTDIR)$(MANDIR)/man$$sec/; \ while read n; do \ PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \ done); \ @@ -699,27 +763,27 @@ uninstall_docs: for i in doc/apps/*.pod; do \ fn=`basename $$i .pod`; \ sec=`$(PERL) util/extract-section.pl 1 < $$i`; \ - echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ - $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ + echo $(RM) $(DESTDIR)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ + $(RM) $(DESTDIR)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ $(PERL) util/extract-names.pl < $$i | \ (grep -v $$filecase "^$$fn\$$"; true) | \ (grep -v "[ ]"; true) | \ while read n; do \ - echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \ - $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \ + echo $(RM) $(DESTDIR)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \ + $(RM) $(DESTDIR)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \ done; \ done; \ for i in doc/crypto/*.pod doc/ssl/*.pod; do \ fn=`basename $$i .pod`; \ sec=`$(PERL) util/extract-section.pl 3 < $$i`; \ - echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ - $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ + echo $(RM) $(DESTDIR)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ + $(RM) $(DESTDIR)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ $(PERL) util/extract-names.pl < $$i | \ (grep -v $$filecase "^$$fn\$$"; true) | \ (grep -v "[ ]"; true) | \ while read n; do \ - echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \ - $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \ + echo $(RM) $(DESTDIR)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \ + $(RM) $(DESTDIR)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \ done; \ done