aboutsummaryrefslogtreecommitdiff
path: root/apps/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'apps/Makefile.am')
-rw-r--r--apps/Makefile.am26
1 files changed, 18 insertions, 8 deletions
diff --git a/apps/Makefile.am b/apps/Makefile.am
index d756e10..0547876 100644
--- a/apps/Makefile.am
+++ b/apps/Makefile.am
@@ -90,18 +90,28 @@ EXTRA_DIST += openssl.cnf
90EXTRA_DIST += x509v3.cnf 90EXTRA_DIST += x509v3.cnf
91 91
92install-exec-hook: 92install-exec-hook:
93 @mkdir -p "$(DESTDIR)/$(OPENSSLDIR)" 93 @if [ "@OPENSSLDIR@x" != "x" ]; then \
94 @for i in cert.pem openssl.cnf x509v3.cnf; do \ 94 OPENSSLDIR="$(DESTDIR)/@OPENSSLDIR@"; \
95 if [ ! -f "$(DESTDIR)/$(OPENSSLDIR)/$i" ]; then \ 95 else \
96 $(INSTALL) -m 644 "$(srcdir)/$$i" "$(DESTDIR)/$(OPENSSLDIR)/$$i"; \ 96 OPENSSLDIR="$(DESTDIR)/$(sysconfdir)/ssl"; \
97 fi; \
98 mkdir -p "$$OPENSSLDIR/certs"; \
99 for i in cert.pem openssl.cnf x509v3.cnf; do \
100 if [ ! -f "$$OPENSSLDIR/$i" ]; then \
101 $(INSTALL) -m 644 "$(srcdir)/$$i" "$$OPENSSLDIR/$$i"; \
97 else \ 102 else \
98 echo " $(DESTDIR)/$(OPENSSLDIR)/$$i already exists, install will not overwrite"; \ 103 echo " $$OPENSSLDIR/$$i already exists, install will not overwrite"; \
99 fi \ 104 fi \
100 done 105 done
101 106
102uninstall-local: 107uninstall-local:
103 @for i in cert.pem openssl.cnf x509v3.cnf; do \ 108 @if [ "@OPENSSLDIR@x" != "x" ]; then \
104 if cmp -s "$(DESTDIR)/$(OPENSSLDIR)/$$i" "$(srcdir)/$$i"; then \ 109 OPENSSLDIR="$(DESTDIR)/@OPENSSLDIR@"; \
105 rm -f "$(DESTDIR)/$(OPENSSLDIR)/$$i"; \ 110 else \
111 OPENSSLDIR="$(DESTDIR)/$(sysconfdir)/ssl"; \
112 fi; \
113 for i in cert.pem openssl.cnf x509v3.cnf; do \
114 if cmp -s "$$OPENSSLDIR/$$i" "$(srcdir)/$$i"; then \
115 rm -f "$$OPENSSLDIR/$$i"; \
106 fi \ 116 fi \
107 done 117 done