Rename INSTALL_PREFIX to DESTDIR, remove option --install_prefix
authorRichard Levitte <levitte@openssl.org>
Fri, 12 Feb 2016 20:14:03 +0000 (21:14 +0100)
committerRichard Levitte <levitte@openssl.org>
Fri, 12 Feb 2016 20:54:07 +0000 (21:54 +0100)
INSTALL_PREFIX is a confusing name, as there's also --prefix.
Instead, tag along with the rest of the open source world and adopt
the Makefile variable DESTDIR to designate the desired staging
directory.

The Configure option --install_prefix is removed, the only way to
designate a staging directory is with the Makefile variable (this is
also implemented for VMS' descrip.mms et al).

Reviewed-by: Rich Salz <rsalz@openssl.org>
14 files changed:
CHANGES
Configurations/descrip.mms.tmpl
Configurations/unix-Makefile.tmpl
Configure
INSTALL
Makefile.in
apps/Makefile.in
crypto/async/Makefile.in
crypto/srp/Makefile.in
crypto/ts/Makefile.in
engines/Makefile.in
openssl.spec
tools/Makefile.in
util/cygwin.sh

diff --git a/CHANGES b/CHANGES
index 29a00bc..cf7d272 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,12 @@
 
  Changes between 1.0.2f and 1.1.0  [xx XXX xxxx]
 
+  *) The INSTALL_PREFIX Makefile variable has been renamed to
+     DESTDIR.  That makes for less confusion on what this variable
+     is for.  Also, the configuration option --install_prefix is
+     removed.
+     [Richard Levitte]
+
   *) Heartbeat for TLS has been removed and is disabled by default
      for DTLS; configure with enable-heartbeats.  Code that uses the
      old #define's might need to be updated.
index 0d5c7ba..4732782 100644 (file)
@@ -106,15 +106,13 @@ PROGRAMS={- join(", ", map { "-\n\t".$_.".EXE" } grep { !m|^\[\.test\]| } @{$uni
 TESTPROGS={- join(", ", map { "-\n\t".$_.".EXE" } grep { m|^\[\.test\]| } @{$unified_info{programs}}) -}
 SCRIPTS={- join(", ", map { "-\n\t".$_ } @{$unified_info{scripts}}) -}
 
-# INSTALL_PREFIX is for package builders so that they can configure for, say,
+# DESTDIR is for package builders so that they can configure for, say,
 # SYS$COMMON:[OPENSSL] and yet have everything installed in STAGING:[USER].
 # In that case, configure with --prefix=SYS$COMMON:[OPENSSL] and then run
-# MMS with /MACROS=(INSTALL_PREFIX=STAGING:[USER]).  The result will end
-# up in STAGING:[USER.OPENSSL].
-# Note that INSTALL_PREFIX can also be given at configuration time, with
-# --install_prefix.
+# MMS with /MACROS=(DESTDIR=STAGING:[USER]).  The result will end up in
+# STAGING:[USER.OPENSSL].
 # Normally it is left empty.
-INSTALL_PREFIX={- $config{install_prefix} -}
+DESTDIR=
 
 # Do not edit this manually. Use Configure --prefix=DIR to change this!
 INSTALLTOP={- catdir($config{prefix}) || "SYS\$COMMON:[OPENSSL-\$(MAJOR).\$(MINOR)]" -}
@@ -160,7 +158,7 @@ NODEBUG=@
         $(NODEBUG) internal_inc3 = F$PARSE("{- catdir($config{sourcedir},"[.crypto.include.internal]") -}","A.;",,,"SYNTAX_ONLY") - "A.;"
         $(NODEBUG) DEFINE openssl 'openssl_inc1','openssl_inc2'
         $(NODEBUG) DEFINE internal 'internal_inc1','internal_inc2','internal_inc3'
-        $(NODEBUG) staging_dir = "$(INSTALL_PREFIX)"
+        $(NODEBUG) staging_dir = "$(DESTDIR)"
         $(NODEBUG) IF staging_dir .NES. "" THEN -
                 staging_dir = F$PARSE("A.;",staging_dir,"[]",,"SYNTAX_ONLY") - "A.;"
         $(NODEBUG) !
@@ -179,7 +177,7 @@ NODEBUG=@
         $(NODEBUG) !
         $(NODEBUG) datatop = F$PARSE("$(OPENSSLDIR)","[000000]A.;",,,"SYNTAX_ONLY") -
                 - "]A.;" + ".]"
-        $(NODEBUG) IF "$(INSTALL_PREFIX)" .EQS. "" THEN -
+        $(NODEBUG) IF "$(DESTDIR)" .EQS. "" THEN -
                 DEFINE ossl_dataroot 'datatop'
         $(NODEBUG) !
         $(NODEBUG) ! Figure out the architecture
@@ -193,7 +191,7 @@ NODEBUG=@
 
 .LAST :
         $(NODEBUG) {- join("\n\t\$(NODEBUG) ", map { "DEASSIGN ".uc($_) } map { $unified_info{sharednames}->{$_} || () } @{$unified_info{libraries}}) || "!" -}
-        $(NODEBUG) IF "$(INSTALL_PREFIX)" .EQS. "" THEN DEASSIGN ossl_dataroot
+        $(NODEBUG) IF "$(DESTDIR)" .EQS. "" THEN DEASSIGN ossl_dataroot
         $(NODEBUG) DEASSIGN ossl_installroot
         $(NODEBUG) DEASSIGN internal
         $(NODEBUG) DEASSIGN openssl
@@ -266,7 +264,7 @@ install_sw : all install_dev install_engines install_runtime install_config
         @ WRITE SYS$OUTPUT ""
         @ WRITE SYS$OUTPUT "Installation complete"
         @ WRITE SYS$OUTPUT ""
-        @ IF "$(INSTALL_PREFIX)" .NES. "" THEN EXIT 1
+        @ IF "$(DESTDIR)" .NES. "" THEN EXIT 1
         @ WRITE SYS$OUTPUT "Run @$(INSTALLTOP)openssl_startup to set up logical names"
         @ WRITE SYS$OUTPUT "then run @$(INSTALLTOP)openssl_setup to define commands"
         @ WRITE SYS$OUTPUT ""
@@ -316,10 +314,10 @@ install_engines : check_INSTALLTOP
 
 install_config : [.VMS]openssl_startup.com [.VMS]openssl_shutdown.com -
                  check_INSTALLTOP
-        IF "$(INSTALL_PREFIX)" .EQS. "" THEN -
+        IF "$(DESTDIR)" .EQS. "" THEN -
                 IF F$SEARCH("OSSL_DATAROOT:[000000]CERTS.DIR;1") .EQS. "" THEN -
                 CREATE/DIR/PROT=(S:RWED,O:RWE,G:RE,W:RE) OSSL_DATAROOT:[CERTS]
-        IF "$(INSTALL_PREFIX)" .EQS. "" THEN -
+        IF "$(DESTDIR)" .EQS. "" THEN -
                 IF F$SEARCH("OSSL_DATAROOT:[000000]PRIVATE.DIR;1") .EQS. "" THEN -
                 CREATE/DIR/PROT=(S:RWED,O:RWE,G:,W:) OSSL_DATAROOT:[PRIVATE]
         CREATE/DIR ossl_installroot:[SYS$STARTUP]
@@ -388,7 +386,7 @@ copy-certs :
 
 debug_logicals :
         SH LOGICAL/PROC openssl,internal,ossl_installroot
-        IF "$(INSTALL_PREFIX)" .EQS. "" THEN -
+        IF "$(DESTDIR)" .EQS. "" THEN -
                 SH LOGICAL/PROC ossl_dataroot
 
 # Building targets ###################################################
index c94a3a1..e013f15 100644 (file)
@@ -42,10 +42,10 @@ MISC_SCRIPTS=$(SRCDIR)/tools/c_hash $(SRCDIR)/tools/c_info \
             $(SRCDIR)/tools/c_issuer $(SRCDIR)/tools/c_name \
             $(BLDDIR)/apps/CA.pl $(SRCDIR)/apps/tsget
 
-# INSTALL_PREFIX is for package builders so that they can configure
-# for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
+# 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
@@ -198,184 +198,184 @@ uninstall_docs: uninstall_man_docs uninstall_html_docs
 install_dev:
        @[ -n "$(INSTALLTOP)" ] || (echo INSTALLTOP should not be empty; exit 1)
        @echo "*** Installing development files"
-       @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl
+       @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(INSTALLTOP)/include/openssl
        @set -e; for i in $(SRCDIR)/include/openssl/*.h \
                          $(BLDDIR)/include/openssl/*.h; do \
                fn=`basename $$i`; \
-               echo "install $$i -> $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$fn"; \
-               cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$fn; \
-               chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$fn; \
+               echo "install $$i -> $(DESTDIR)$(INSTALLTOP)/include/openssl/$$fn"; \
+               cp $$i $(DESTDIR)$(INSTALLTOP)/include/openssl/$$fn; \
+               chmod 644 $(DESTDIR)$(INSTALLTOP)/include/openssl/$$fn; \
        done
-       @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)
+       @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)
        @set -e; for l in $(LIBS); do \
                fn=`basename $$l`; \
-               echo "install $$l -> $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$fn"; \
-               cp $$l $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$fn.new; \
-               $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$fn.new; \
-               chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$fn.new; \
-               mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$fn.new \
-                     $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$fn; \
+               echo "install $$l -> $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn"; \
+               cp $$l $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn.new; \
+               $(RANLIB) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn.new; \
+               chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn.new; \
+               mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn.new \
+                     $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn; \
        done
        @ : {- output_off() if $config{no_shared}; "" -}
        @set -e; for s in $(SHLIBS); do \
                fn=`basename $$s`; \
-               echo "install $$s -> $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$fn"; \
-               cp $$s $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$fn.new; \
-               chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$fn.new; \
-               mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$fn.new \
-                     $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$fn; \
+               echo "install $$s -> $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn"; \
+               cp $$s $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn.new; \
+               chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn.new; \
+               mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn.new \
+                     $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn; \
                if [ "$(SHLIB_EXT)" != "$(SHLIB_EXT_SIMPLE)" ]; then \
-                       echo "link $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$fn2 -> $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$fn"; \
+                       echo "link $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn2 -> $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn"; \
                        fn2=`basename $$fn $(SHLIB_EXT)`$(SHLIB_EXT_SIMPLE); \
-                       ln -sf $$fn $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$fn2; \
+                       ln -sf $$fn $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn2; \
                fi; \
                : {- output_off() unless windowsdll(); "" -}; \
-               echo "install $$s.a -> $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$fn.a"; \
-               cp $$s.a $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$fn.a.new; \
-               chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$fn.a.new; \
-               mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$fn.a.new \
-                     $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$fn.a; \
+               echo "install $$s.a -> $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn.a"; \
+               cp $$s.a $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn.a.new; \
+               chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn.a.new; \
+               mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn.a.new \
+                     $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn.a; \
                : {- output_on() -}; \
        done
        @ : {- output_on() -}
-       @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
-       @echo "install libcrypto.pc -> $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc"
-       @cp libcrypto.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
-       @chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
-       @echo "install libssl.pc -> $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc"
-       @cp libssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
-       @chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
-       @echo "install openssl.pc -> $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc"
-       @cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
-       @chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
+       @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
+       @echo "install libcrypto.pc -> $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc"
+       @cp libcrypto.pc $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
+       @chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
+       @echo "install libssl.pc -> $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc"
+       @cp libssl.pc $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
+       @chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
+       @echo "install openssl.pc -> $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc"
+       @cp openssl.pc $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
+       @chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
 
 uninstall_dev:
        @echo "*** Uninstalling development files"
        @set -e; for i in $(SRCDIR)/include/openssl/*.h \
                          $(BLDDIR)/include/openssl/*.h; do \
                fn=`basename $$i`; \
-               echo "$(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$fn"; \
-               $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$fn; \
+               echo "$(RM) $(DESTDIR)$(INSTALLTOP)/include/openssl/$$fn"; \
+               $(RM) $(DESTDIR)$(INSTALLTOP)/include/openssl/$$fn; \
        done
        @set -e; for l in $(LIBS); do \
                fn=`basename $$l`; \
-               echo "$(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$fn"; \
-               $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$fn; \
+               echo "$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn"; \
+               $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn; \
        done
        @set -e; for s in $(SHLIBS); do \
                fn=`basename $$s`; \
                if [ "$(SHLIB_EXT)" != "$(SHLIB_EXT_SIMPLE)" ]; then \
                        fn2=`basename $$fn $(SHLIB_EXT)`$(SHLIB_EXT_SIMPLE); \
-                       echo "$(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$fn2"; \
-                       $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$fn2; \
+                       echo "$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn2"; \
+                       $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn2; \
                fi; \
-               echo "$(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$fn"; \
-               $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$fn; \
+               echo "$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn"; \
+               $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn; \
                : {- output_off() unless windowsdll(); "" -}; \
-               echo "$(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$fn.a"; \
-               $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$fn.a; \
+               echo "$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn.a"; \
+               $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn.a; \
                : {- output_on() -}; \
        done
-       @echo "$(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc"
-       @$(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
-       @echo "$(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc"
-       @$(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
-       @echo "$(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc"
-       @$(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
+       @echo "$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc"
+       @$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
+       @echo "$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc"
+       @$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
+       @echo "$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc"
+       @$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
 
 install_engines:
        @[ -n "$(INSTALLTOP)" ] || (echo INSTALLTOP should not be empty; exit 1)
-       @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/
+       @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/
        @echo "*** Installing engines"
        @set -e; for e in $(ENGINES); do \
                fn=`basename $$e`; \
-               echo "install $$e -> $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$fn"; \
-               cp $$e $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$fn.new; \
-               chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$fn.new; \
-               mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$fn.new \
-                     $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$fn; \
+               echo "install $$e -> $(DESTDIR)$(INSTALLTOP)/bin/$$fn"; \
+               cp $$e $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$$fn.new; \
+               chmod 755 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$$fn.new; \
+               mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$$fn.new \
+                     $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$$fn; \
        done
 
 uninstall_engines:
        @echo "*** Uninstalling engines"
        @set -e; for e in $(ENGINES); do \
                fn=`basename $$e`; \
-               echo "$(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$fn"; \
-               $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$fn; \
+               echo "$(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$fn"; \
+               $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$$fn; \
        done
 
 install_runtime:
        @[ -n "$(INSTALLTOP)" ] || (echo INSTALLTOP should not be empty; exit 1)
-       @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin
-       @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(INSTALL_PREFIX)$(OPENSSLDIR)/misc
+       @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(INSTALLTOP)/bin
+       @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(OPENSSLDIR)/misc
        @echo "*** Installing runtime files"
        : {- output_off() unless windowsdll(); "" -};
        @set -e; for s in $(SHLIBS); do \
                fn=`basename $$i`; \
-               echo "install $$s -> $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$fn"; \
-               cp $$s $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$fn.new; \
-               chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$fn.new; \
-               mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$fn.new \
-                     $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$fn; \
+               echo "install $$s -> $(DESTDIR)$(INSTALLTOP)/bin/$$fn"; \
+               cp $$s $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new; \
+               chmod 644 $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new; \
+               mv -f $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new \
+                     $(DESTDIR)$(INSTALLTOP)/bin/$$fn; \
        done
        : {- output_on() -};
        @set -e; for x in $(PROGRAMS); do \
                fn=`basename $$x`; \
-               echo "install $$x -> $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$fn"; \
-               cp $$x $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$fn.new; \
-               chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$fn.new; \
-               mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$fn.new \
-                     $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$fn; \
+               echo "install $$x -> $(DESTDIR)$(INSTALLTOP)/bin/$$fn"; \
+               cp $$x $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new; \
+               chmod 755 $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new; \
+               mv -f $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new \
+                     $(DESTDIR)$(INSTALLTOP)/bin/$$fn; \
        done
        @set -e; for x in $(BIN_SCRIPTS); do \
                fn=`basename $$x`; \
-               echo "install $$x -> $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$fn"; \
-               cp $$x $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$fn.new; \
-               chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$fn.new; \
-               mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$fn.new \
-                     $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$fn; \
+               echo "install $$x -> $(DESTDIR)$(INSTALLTOP)/bin/$$fn"; \
+               cp $$x $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new; \
+               chmod 755 $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new; \
+               mv -f $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new \
+                     $(DESTDIR)$(INSTALLTOP)/bin/$$fn; \
        done
        @set -e; for x in $(MISC_SCRIPTS); do \
                fn=`basename $$x`; \
-               echo "install $$x -> $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$fn"; \
-               cp $$x $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$fn.new; \
-               chmod 755 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$fn.new; \
-               mv -f $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$fn.new \
-                     $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$fn; \
+               echo "install $$x -> $(DESTDIR)$(OPENSSLDIR)/misc/$$fn"; \
+               cp $$x $(DESTDIR)$(OPENSSLDIR)/misc/$$fn.new; \
+               chmod 755 $(DESTDIR)$(OPENSSLDIR)/misc/$$fn.new; \
+               mv -f $(DESTDIR)$(OPENSSLDIR)/misc/$$fn.new \
+                     $(DESTDIR)$(OPENSSLDIR)/misc/$$fn; \
        done
-       @echo "install $(SRCDIR)/apps/openssl.cnf -> $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf"
-       @cp $(SRCDIR)/apps/openssl.cnf $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new
-       @chmod 644 $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new
-       @mv -f  $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf
+       @echo "install $(SRCDIR)/apps/openssl.cnf -> $(DESTDIR)$(OPENSSLDIR)/openssl.cnf"
+       @cp $(SRCDIR)/apps/openssl.cnf $(DESTDIR)$(OPENSSLDIR)/openssl.cnf.new
+       @chmod 644 $(DESTDIR)$(OPENSSLDIR)/openssl.cnf.new
+       @mv -f  $(DESTDIR)$(OPENSSLDIR)/openssl.cnf.new $(DESTDIR)$(OPENSSLDIR)/openssl.cnf
 
 uninstall_runtime:
        @echo "*** Uninstalling runtime files"
        @set -e; for x in $(PROGRAMS); \
        do  \
                fn=`basename $$x`; \
-               echo "$(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$fn"; \
-               $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$fn; \
+               echo "$(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$fn"; \
+               $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$fn; \
        done;
        @set -e; for x in $(BIN_SCRIPTS); \
        do  \
                fn=`basename $$x`; \
-               echo "$(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$fn"; \
-               $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$fn; \
+               echo "$(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$fn"; \
+               $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$fn; \
        done
        @set -e; for x in $(MISC_SCRIPTS); \
        do  \
                fn=`basename $$x`; \
-               echo "$(RM) $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$fn"; \
-               $(RM) $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$fn; \
+               echo "$(RM) $(DESTDIR)$(OPENSSLDIR)/misc/$$fn"; \
+               $(RM) $(DESTDIR)$(OPENSSLDIR)/misc/$$fn; \
        done
        : {- output_off() unless windowsdll(); "" -};
        @set -e; for s in $(SHLIBS); do \
                fn=`basename $$i`; \
-               echo "$(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$fn"; \
-               $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$fn; \
+               echo "$(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$fn"; \
+               $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$fn; \
        done
        : {- output_on() -};
-       $(RM) $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf
+       $(RM) $(DESTDIR)$(OPENSSLDIR)/openssl.cnf
 
 # A method to extract all names from a .pod file
 # The first sed extracts everything between "=head1 NAME" and the next =head1
@@ -442,7 +442,7 @@ install_man_docs:
        @echo "*** Installing manpages"
        @\
        OUTSUFFIX='.$${SEC}$(MANSUFFIX)'; \
-       OUTTOP="$(INSTALL_PREFIX)$(MANDIR)"; \
+       OUTTOP="$(DESTDIR)$(MANDIR)"; \
        GENERATE='pod2man --name=$$NAME --section=$$SEC --center=OpenSSL --release=$(VERSION)'; \
        $(PROCESS_PODS)
 
@@ -450,7 +450,7 @@ uninstall_man_docs:
        @echo "*** Uninstalling manpages"
        @\
        OUTSUFFIX='.$${SEC}$(MANSUFFIX)'; \
-       OUTTOP="$(INSTALL_PREFIX)$(MANDIR)"; \
+       OUTTOP="$(DESTDIR)$(MANDIR)"; \
        $(UNINSTALL_DOCS)
 
 install_html_docs:
@@ -458,7 +458,7 @@ install_html_docs:
        @echo "*** Installing HTML manpages"
        @\
        OUTSUFFIX='.$(HTMLSUFFIX)'; \
-       OUTTOP="$(INSTALL_PREFIX)$(HTMLDIR)"; \
+       OUTTOP="$(DESTDIR)$(HTMLDIR)"; \
        GENERATE="pod2html --podroot=$(SRCDIR)/doc --htmldir=.. \
                           --podpath=apps:crypto:ssl \
                  | sed -e 's|href=\"http://man.he.net/man|href=\"../man|g'"; \
@@ -468,7 +468,7 @@ uninstall_html_docs:
        @echo "*** Uninstalling manpages"
        @\
        OUTSUFFIX='.$(HTMLSUFFIX)'; \
-       OUTTOP="$(INSTALL_PREFIX)$(HTMLDIR)"; \
+       OUTTOP="$(DESTDIR)$(HTMLDIR)"; \
        $(UNINSTALL_DOCS)
 
 
index 2ba33cb..138ffd3 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -32,10 +32,6 @@ my $usage="Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [experimenta
 #               This becomes the value of OPENSSLDIR in Makefile and in C.
 #               (Default: PREFIX/ssl)
 #
-# --install_prefix  Additional prefix for package builders (empty by
-#               default).  This needn't be set in advance, you can
-#               just as well use "make INSTALL_PREFIX=/whatever install".
-#
 # --cross-compile-prefix Add specified prefix to binutils components.
 #
 # --api         One of 0.9.8, 1.0.0 or 1.1.0.  Do not compile support for
@@ -184,7 +180,6 @@ $config{prefix}="";
 $config{openssldir}="";
 $config{processor}="";
 $config{libdir}="";
-$config{install_prefix}= "$ENV{'INSTALL_PREFIX'}";
 $config{cross_compile_prefix}="";
 $config{fipslibdir}="/usr/local/ssl/fips-2.0/lib/";
 my $nofipscanistercheck=0;
@@ -604,10 +599,6 @@ foreach (@argvcopy)
                        {
                        $config{openssldir}=$1;
                        }
-               elsif (/^--install.prefix=(.*)$/)
-                       {
-                       $config{install_prefix}=$1;
-                       }
                elsif (/^--with-zlib-lib=(.*)$/)
                        {
                        $withargs{zlib_lib}=$1;
diff --git a/INSTALL b/INSTALL
index 5ed0d58..31d8857 100644 (file)
--- a/INSTALL
+++ b/INSTALL
      locations, but have the package installed somewhere else so that
      it can easily be packaged, can use
 
-       $ make INSTALL_PREFIX=/tmp/package-root install
+       $ make DESTDIR=/tmp/package-root install
 
-     (or specify "--install_prefix=/tmp/package-root" as a configure
-     option).  The specified prefix will be prepended to all
+     The specified destination directory will be prepended to all
      installation target filenames.
 
 
index b52bc18..ad51e76 100644 (file)
@@ -21,10 +21,10 @@ 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
@@ -215,14 +215,14 @@ 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
 
@@ -251,7 +251,7 @@ BUILDENV=   LC_ALL=C PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)'\
                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)'                            \
@@ -565,18 +565,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 \
@@ -587,16 +587,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 \
@@ -604,34 +604,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)"; \
@@ -640,28 +640,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:
@@ -671,7 +671,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)"; \
@@ -679,10 +679,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/<!DOCTYPE.*//g' \
-                       > $(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); \
@@ -698,21 +698,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) \
@@ -726,11 +726,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); \
@@ -743,11 +743,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); \
@@ -762,27 +762,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
 
index e3f485d..5fb4f47 100644 (file)
@@ -80,33 +80,33 @@ install:
        @set -e; for i in $(EXE); \
        do  \
        (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 ); \
         done;
        @set -e; for i in $(SCRIPTS); \
        do  \
        (echo installing $$i; \
-        cp $$i $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new; \
-        chmod 755 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new; \
-        mv -f $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i ); \
+        cp $$i $(DESTDIR)$(OPENSSLDIR)/misc/$$i.new; \
+        chmod 755 $(DESTDIR)$(OPENSSLDIR)/misc/$$i.new; \
+        mv -f $(DESTDIR)$(OPENSSLDIR)/misc/$$i.new $(DESTDIR)$(OPENSSLDIR)/misc/$$i ); \
         done
-       @cp openssl.cnf $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new; \
-       chmod 644 $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new; \
-       mv -f  $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf
+       @cp openssl.cnf $(DESTDIR)$(OPENSSLDIR)/openssl.cnf.new; \
+       chmod 644 $(DESTDIR)$(OPENSSLDIR)/openssl.cnf.new; \
+       mv -f  $(DESTDIR)$(OPENSSLDIR)/openssl.cnf.new $(DESTDIR)$(OPENSSLDIR)/openssl.cnf
 
 uninstall:
        @set -e; for i in $(EXE); \
        do  \
-               echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \
-               $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \
+               echo $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$i; \
+               $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$i; \
        done;
        @set -e; for i in $(SCRIPTS); \
        do  \
-               echo $(RM) $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i; \
-               $(RM) $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i; \
+               echo $(RM) $(DESTDIR)$(OPENSSLDIR)/misc/$$i; \
+               $(RM) $(DESTDIR)$(OPENSSLDIR)/misc/$$i; \
        done
-       $(RM) $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf
+       $(RM) $(DESTDIR)$(OPENSSLDIR)/openssl.cnf
 
 generate: openssl-vms.cnf progs.h
 
index c50b04d..1a89b99 100644 (file)
@@ -48,8 +48,8 @@ install:
        @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
        @headerlist="$(EXHEADER)"; for i in $$headerlist ; \
        do  \
-       (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
-       chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
+       (cp $$i $(DESTDIR)$(INSTALLTOP)/include/openssl/$$i; \
+       chmod 644 $(DESTDIR)$(INSTALLTOP)/include/openssl/$$i ); \
        done;
 
 depend:
index 3b654da..eded0e7 100644 (file)
@@ -3,7 +3,7 @@ TOP=    ../..
 CC=    cc
 INCLUDES= -I.. -I$(TOP) -I../../include
 CFLAG=-g
-INSTALL_PREFIX=
+DESTDIR=
 OPENSSLDIR=     /usr/local/ssl
 INSTALLTOP=/usr/local/ssl
 AR=            ar r
index 68a3206..db034ba 100644 (file)
@@ -6,7 +6,7 @@ TOP=    ../..
 CC=    cc
 INCLUDES= -I.. -I../../include
 CFLAG = -g
-INSTALL_PREFIX=
+DESTDIR=
 OPENSSLDIR=     /usr/local/ssl
 INSTALLTOP=/usr/local/ssl
 AR=            ar r
index 2207c5c..e4204ee 100644 (file)
@@ -88,13 +88,13 @@ install:
        @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
        @if [ -n "$(SHARED_LIBS)" ]; then \
                set -e; \
-               $(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines; \
+               $(PERL) $(TOP)/util/mkdir-p.pl $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines; \
                for l in $(LIBNAMES); do \
                        ( echo installing $$l; \
                          pfx=lib; \
                          if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
                                sfx=".so"; \
-                               cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
+                               cp cyg$$l.dll $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
                          else \
                                case "$(CFLAGS)" in \
                                *DSO_DLFCN*)    sfx=`expr "$(SHLIB_EXT)" : '.*\(\.[a-z][a-z]*\)' \| ".so"`;;    \
@@ -102,10 +102,10 @@ install:
                                *DSO_WIN32*)    sfx="eay32.dll"; pfx=;; \
                                *)              sfx=".bad";;    \
                                esac; \
-                               cp $$pfx$$l$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
+                               cp $$pfx$$l$$sfx $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
                          fi; \
-                         chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
-                         mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \
+                         chmod 555 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
+                         mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \
                done; \
        fi
 
index f347c48..ceda82a 100644 (file)
@@ -103,7 +103,7 @@ LD_LIBRARY_PATH=`pwd` make test
 
 %install
 rm -rf $RPM_BUILD_ROOT
-make MANDIR=/usr/man MANSUFFIX=ssl INSTALL_PREFIX="$RPM_BUILD_ROOT" install
+make MANDIR=/usr/man MANSUFFIX=ssl DESTDIR="$RPM_BUILD_ROOT" install
 
 # Make backwards-compatibility symlink to ssleay
 ln -sf /usr/bin/openssl $RPM_BUILD_ROOT/usr/bin/ssleay
index d0c5ca2..7b4f14e 100644 (file)
@@ -23,27 +23,27 @@ install:
        @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
        @for i in $(APPS) ; \
        do  \
-       (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 ); \
        done;
        @for i in $(MISC_APPS) ; \
        do  \
-       (cp $$i $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new; \
-       chmod 755 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new; \
-       mv -f $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i ); \
+       (cp $$i $(DESTDIR)$(OPENSSLDIR)/misc/$$i.new; \
+       chmod 755 $(DESTDIR)$(OPENSSLDIR)/misc/$$i.new; \
+       mv -f $(DESTDIR)$(OPENSSLDIR)/misc/$$i.new $(DESTDIR)$(OPENSSLDIR)/misc/$$i ); \
        done;
 
 uninstall:
        @for i in $(APPS) ; \
        do  \
-               echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \
-               $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \
+               echo $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$i; \
+               $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$i; \
        done;
        @for i in $(MISC_APPS) ; \
        do  \
-               echo $(RM) $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i; \
-               $(RM) $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i; \
+               echo $(RM) $(DESTDIR)$(OPENSSLDIR)/misc/$$i; \
+               $(RM) $(DESTDIR)$(OPENSSLDIR)/misc/$$i; \
        done;
 
 files:
index cfdb04d..4f7fac9 100755 (executable)
@@ -8,7 +8,7 @@
 #set -x
 
 CONFIG_OPTIONS="--prefix=/usr shared zlib no-idea no-rc5"
-INSTALL_PREFIX=/tmp/install/INSTALL
+DESTDIR=/tmp/install/INSTALL
 
 VERSION=
 SHLIB_VERSION_NUMBER=
@@ -16,8 +16,8 @@ SUBVERSION=$1
 
 function cleanup()
 {
-  rm -rf ${INSTALL_PREFIX}/etc
-  rm -rf ${INSTALL_PREFIX}/usr
+  rm -rf ${DESTDIR}/etc
+  rm -rf ${DESTDIR}/usr
 }
 
 function get_openssl_version()
@@ -40,14 +40,14 @@ function get_openssl_version()
 
 function base_install()
 {
-  mkdir -p ${INSTALL_PREFIX}
+  mkdir -p ${DESTDIR}
   cleanup
-  make install INSTALL_PREFIX="${INSTALL_PREFIX}"
+  make install DESTDIR="${DESTDIR}"
 }
 
 function doc_install()
 {
-  DOC_DIR=${INSTALL_PREFIX}/usr/share/doc/openssl
+  DOC_DIR=${DESTDIR}/usr/share/doc/openssl
 
   mkdir -p ${DOC_DIR}
   cp CHANGES CHANGES.SSLeay INSTALL LICENSE NEWS README ${DOC_DIR}
@@ -57,7 +57,7 @@ function doc_install()
 
 function certs_install()
 {
-  CERTS_DIR=${INSTALL_PREFIX}/usr/ssl/certs
+  CERTS_DIR=${DESTDIR}/usr/ssl/certs
 
   mkdir -p ${CERTS_DIR}
   cp -rp certs/* ${CERTS_DIR}
@@ -65,7 +65,7 @@ function certs_install()
 
 function create_cygwin_readme()
 {
-  README_DIR=${INSTALL_PREFIX}/usr/share/doc/Cygwin
+  README_DIR=${DESTDIR}/usr/share/doc/Cygwin
   README_FILE=${README_DIR}/openssl-${VERSION}.README
 
   mkdir -p ${README_DIR}
@@ -81,7 +81,7 @@ function create_cygwin_readme()
 
 function create_profile_files()
 {
-  PROFILE_DIR=${INSTALL_PREFIX}/etc/profile.d
+  PROFILE_DIR=${DESTDIR}/etc/profile.d
 
   mkdir -p $PROFILE_DIR
   cat > ${PROFILE_DIR}/openssl.sh <<- "EOF"
@@ -126,7 +126,7 @@ create_cygwin_readme
 
 create_profile_files
 
-cd ${INSTALL_PREFIX}
+cd ${DESTDIR}
 chmod u+w usr/lib/engines/*.so
 strip usr/bin/*.exe usr/bin/*.dll usr/lib/engines/*.so
 chmod u-w usr/lib/engines/*.so