Have the same installation directories in unified as in unixmake
[openssl.git] / Configurations / unix-Makefile.tmpl
index c649d3d3c8d35d5cde087f82b2059fdac3c42ac3..84b3630c537ba58bbfce3086c8a97010ba91b727 100644 (file)
@@ -82,8 +82,8 @@ LIBDIR={- #
 ENGINESDIR={- use File::Spec::Functions;
               catdir($prefix,$libdir,"engines") -}
 
-MANDIR=$(OPENSSLDIR)/man
-HTMLDIR=$(OPENSSLDIR)/html
+MANDIR=$(INSTALLTOP)/share/man
+HTMLDIR=$(INSTALLTOP)/share/doc/$(BASENAME)/html
 
 MANSUFFIX=ssl
 HTMLSUFFIX=html
@@ -112,6 +112,7 @@ SHARED_LDFLAGS={- $target{shared_ldflag}
                   # $prefix is not /usr.
                   . ($config{target} =~ m|^BSD-| && $prefix !~ m|^/usr/.*$|
                      ? " -Wl,-rpath,\$\$(LIBRPATH)" : "") -}
+SHARED_RCFLAGS={- $target{shared_rcflag} -}
 
 PERL={- $config{perl} -}
 
@@ -156,7 +157,7 @@ list-tests:
 libclean:
        -rm -f `find $(BLDDIR) -name '*$(LIB_EXT)' -o -name '*$(SHLIB_EXT)'`
 
-install: install_sw install_docs
+install: install_sw install_ssldirs install_docs
 
 uninstall: uninstall_docs uninstall_sw
 
@@ -195,6 +196,10 @@ install_docs: install_man_docs install_html_docs
 
 uninstall_docs: uninstall_man_docs uninstall_html_docs
 
+install_ssldirs:
+       @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(OPENSSLDIR)/certs
+       @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(OPENSSLDIR)/private
+
 install_dev:
        @[ -n "$(INSTALLTOP)" ] || (echo INSTALLTOP should not be empty; exit 1)
        @echo "*** Installing development files"
@@ -235,9 +240,9 @@ install_dev:
                chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn.a.new; \
                mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn.a.new \
                      $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn.a; \
-               : {- output_on() -}; \
+               : {- output_on() unless windowsdll(); "" -}; \
        done
-       @ : {- output_on() -}
+       @ : {- output_on() if $config{no_shared}; "" -}
        @$(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
@@ -274,7 +279,7 @@ uninstall_dev:
                : {- output_off() unless windowsdll(); "" -}; \
                echo "$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn.a"; \
                $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn.a; \
-               : {- output_on() -}; \
+               : {- output_on() unless windowsdll(); "" -}; \
        done
        @echo "$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc"
        @$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
@@ -318,7 +323,7 @@ install_runtime:
                mv -f $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new \
                      $(DESTDIR)$(INSTALLTOP)/bin/$$fn; \
        done
-       : {- output_on() -};
+       : {- output_on() unless windowsdll(); "" -};
        @set -e; for x in $(PROGRAMS); do \
                fn=`basename $$x`; \
                echo "install $$x -> $(DESTDIR)$(INSTALLTOP)/bin/$$fn"; \
@@ -374,7 +379,7 @@ uninstall_runtime:
                echo "$(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$fn"; \
                $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$fn; \
        done
-       : {- output_on() -};
+       : {- output_on() unless windowsdll(); "" -};
        $(RM) $(DESTDIR)$(OPENSSLDIR)/openssl.cnf
 
 # A method to extract all names from a .pod file
@@ -406,7 +411,14 @@ PROCESS_PODS=\
                names=`cat $$p | $(EXTRACT_NAMES)`; \
                ( cd $$top/man$$SEC; \
                  for n in $$names; do \
-                     if [ "$$n" != "$$fn" ]; then \
+                     comp_n="$$n"; \
+                     comp_fn="$$fn"; \
+                     case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \
+                         comp_n=`echo "$$n" | tr [A-Z] [a-z]`; \
+                         comp_fn=`echo "$$fn" | tr [A-Z] [a-z]`; \
+                         ;; \
+                     esac; \
+                     if [ "$$comp_n" != "$$comp_fn" ]; then \
                          echo "link $$top/man$$SEC/$$n$$suf -> $$top/man$$SEC/$$fn$$suf"; \
                          PLATFORM=$(PLATFORM) $$point $$fn$$suf $$n$$suf; \
                      fi; \
@@ -429,7 +441,14 @@ UNINSTALL_DOCS=\
                $(RM) $$top/man$$SEC/$$fn$$suf; \
                names=`cat $$p | $(EXTRACT_NAMES)`; \
                for n in $$names; do \
-                   if [ "$$n" != "$$fn" ]; then \
+                   comp_n="$$n"; \
+                   comp_fn="$$fn"; \
+                   case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \
+                       comp_n=`echo "$$n" | tr [A-Z] [a-z]`; \
+                       comp_fn=`echo "$$fn" | tr [A-Z] [a-z]`; \
+                       ;; \
+                   esac; \
+                   if [ "$$comp_n" != "$$comp_fn" ]; then \
                        echo "$(RM) $$top/man$$SEC/$$n$$suf"; \
                        $(RM) $$top/man$$SEC/$$n$$suf; \
                    fi; \
@@ -776,6 +795,7 @@ $shlibtarget : $lib\$(LIB_EXT) $deps $ordinalsfile
                CC="\$(CC)" CFLAGS="\$(CFLAGS)" LDFLAGS="\$(LDFLAGS)" \\
                CROSS_COMPILE="\$(CROSS_COMPILE)" \\
                SHARED_LDFLAGS="\$(SHARED_LDFLAGS)" SHLIB_EXT=\$(SHLIB_EXT) \\
+               SHARED_RCFLAGS="\$(SHARED_RCFLAGS)" \\
                link_a.$shlib_target
 EOF
          . (windowsdll() ? <<"EOF" : "");
@@ -841,7 +861,7 @@ $bin\$(EXE_EXT) : $objs $deps
        \$(MAKE) -f \$(SRCDIR)/Makefile.shared -e \\
                PERL=\$(PERL) SRCDIR=\$(SRCDIR) \\
                APPNAME=$bin OBJECTS="$objs" \\
-               LIBDEPS="\$(PLIB_LDFLAGS) \$(LDFLAGS) $linklibs \$(EX_LIBS)" \\
+               LIBDEPS="\$(PLIB_LDFLAGS) $linklibs \$(EX_LIBS)" \\
                CC="\$(CC)" CFLAGS="\$(CFLAGS)" LDFLAGS="\$(LDFLAGS)" \\
                LIBRPATH="\$(INSTALLTOP)/\$(LIBDIR)" \\
                link_app.$shlib_target