summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2020-01-22 07:58:29 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2020-01-22 07:58:29 +0000
commit0c8460c1d951f5776ee1cdb2a71af5b0ac68b326 (patch)
tree8fd21c75fe46557123e675545a24a5724e6b6046
parent769ba23bf760619d841e053cfc0eafffebe091c9 (diff)
Add checks to ensure that lib{crypto,ssl,tls} public headers have actually
been installed prior to building. Requested by and ok tb@
-rw-r--r--lib/libcrypto/Makefile12
-rw-r--r--lib/libssl/Makefile12
-rw-r--r--lib/libtls/Makefile12
3 files changed, 33 insertions, 3 deletions
diff --git a/lib/libcrypto/Makefile b/lib/libcrypto/Makefile
index b92f8cd56d7..b38bf884b9b 100644
--- a/lib/libcrypto/Makefile
+++ b/lib/libcrypto/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.38 2020/01/22 06:56:50 jsing Exp $
+# $OpenBSD: Makefile,v 1.39 2020/01/22 07:58:27 jsing Exp $
LIB= crypto
LIBREBUILD=y
@@ -411,6 +411,16 @@ HDRS_GEN=\
prereq: obj_mac.h
+check_includes: prereq
+ @cd ${.CURDIR}; for i in $(HDRS) $(HDRS_GEN); do \
+ j="cmp -s $$i ${DESTDIR}/usr/include/openssl/`basename $$i` || \
+ (echo \"`basename $$i` differs from installed version; \" \
+ \"did you forget 'make includes'?\" && false)"; \
+ eval "$$j"; \
+ done;
+
+all: check_includes
+
includes: prereq
@test -d ${DESTDIR}/usr/include/openssl || \
mkdir ${DESTDIR}/usr/include/openssl
diff --git a/lib/libssl/Makefile b/lib/libssl/Makefile
index b30fcca9eb7..b38bb5f6829 100644
--- a/lib/libssl/Makefile
+++ b/lib/libssl/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.59 2020/01/22 01:21:43 jsing Exp $
+# $OpenBSD: Makefile,v 1.60 2020/01/22 07:58:27 jsing Exp $
.include <bsd.own.mk>
.ifndef NOMAN
@@ -81,6 +81,16 @@ HDRS= dtls1.h srtp.h ssl.h ssl2.h ssl23.h ssl3.h tls1.h
.PATH: ${.CURDIR}
+check_includes:
+ @cd ${.CURDIR}; for i in $(HDRS); do \
+ j="cmp -s $$i ${DESTDIR}/usr/include/openssl/`basename $$i` || \
+ (echo \"`basename $$i` differs from installed version; \" \
+ \"did you forget 'make includes'?\" && false)"; \
+ eval "$$j"; \
+ done;
+
+all: check_includes
+
includes:
@test -d ${DESTDIR}/usr/include/openssl || \
mkdir ${DESTDIR}/usr/include/openssl
diff --git a/lib/libtls/Makefile b/lib/libtls/Makefile
index c47119685e1..fdf976169fe 100644
--- a/lib/libtls/Makefile
+++ b/lib/libtls/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.33 2018/02/08 05:56:49 jsing Exp $
+# $OpenBSD: Makefile,v 1.34 2020/01/22 07:58:28 jsing Exp $
.include <bsd.own.mk>
.ifndef NOMAN
@@ -39,6 +39,16 @@ SRCS= tls.c \
tls_ocsp.c \
tls_verify.c
+check_includes:
+ @cd ${.CURDIR}; for i in $(HDRS); do \
+ j="cmp -s $$i ${DESTDIR}/usr/include/openssl/`basename $$i` || \
+ (echo \"`basename $$i` differs from installed version; \" \
+ \"did you forget 'make includes'?\" && false)"; \
+ eval "$$j"; \
+ done;
+
+all: check_includes
+
includes:
@cd ${.CURDIR}; for i in $(HDRS); do \
j="cmp -s $$i ${DESTDIR}/usr/include/$$i || \