aboutsummaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorBrent Cook <bcook@openbsd.org>2015-07-15 20:00:21 -0500
committerBrent Cook <bcook@openbsd.org>2015-07-15 20:02:38 -0500
commitdb974c34e95a24eda7ce575cc14bbc0eebfbdbb4 (patch)
treef884d9c33c5dd2c5e44b42d8b104a4117bbb2ea2 /apps
parent4cffda193ba3fd6d0a167e5188ae52517c0c476d (diff)
downloadportable-db974c34e95a24eda7ce575cc14bbc0eebfbdbb4.tar.gz
portable-db974c34e95a24eda7ce575cc14bbc0eebfbdbb4.tar.bz2
portable-db974c34e95a24eda7ce575cc14bbc0eebfbdbb4.zip
fixup how OPENSSLDIR is derived and expanded
As per http://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Installation-Directory-Variables.html we should not try to expand variables like sysconfdir in the configure script, but rather derive the correct value in the Makefiles instead. This fixes missing expansions as the preprocessor define.
Diffstat (limited to 'apps')
-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