From ceac7d2c6e91336c8238cc1345fe787251561abb Mon Sep 17 00:00:00 2001 From: natano <> Date: Wed, 14 Sep 2016 06:26:03 +0000 Subject: Generate pkg-config files at build time like everything else. This avoids permission problems due to the build and install stages being run by different users. ok deraadt jasper --- src/lib/libcrypto/Makefile | 5 +++-- src/lib/libssl/Makefile | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libcrypto/Makefile b/src/lib/libcrypto/Makefile index 71c3e89fb6..8b7f00d2b9 100644 --- a/src/lib/libcrypto/Makefile +++ b/src/lib/libcrypto/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.5 2016/09/11 14:31:02 natano Exp $ +# $OpenBSD: Makefile,v 1.6 2016/09/14 06:26:02 natano Exp $ LIB= crypto @@ -431,10 +431,11 @@ distribution: ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \ ${.CURDIR}/x509v3.cnf ${DESTDIR}/etc/ssl/x509v3.cnf +all: ${PC_FILES} ${PC_FILES}: opensslv.h /bin/sh ${.CURDIR}/generate_pkgconfig.sh -c ${.CURDIR} -o ${.OBJDIR} -beforeinstall: ${PC_FILES} +beforeinstall: ${INSTALL} ${INSTALL_COPY} -o root -g ${SHAREGRP} \ -m ${SHAREMODE} ${.OBJDIR}/${PC_FILES} ${DESTDIR}/usr/lib/pkgconfig/ diff --git a/src/lib/libssl/Makefile b/src/lib/libssl/Makefile index f442bd90bb..4a5c140ed1 100644 --- a/src/lib/libssl/Makefile +++ b/src/lib/libssl/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.21 2016/09/04 09:54:25 natano Exp $ +# $OpenBSD: Makefile,v 1.22 2016/09/14 06:26:03 natano Exp $ SUBDIR= man PC_FILES=openssl.pc libssl.pc @@ -48,10 +48,11 @@ includes: .include +all: ${PC_FILES} ${PC_FILES}: ${.CURDIR}/../libcrypto/opensslv.h /bin/sh ${.CURDIR}/generate_pkgconfig.sh -c ${.CURDIR} -o ${.OBJDIR} -beforeinstall: ${PC_FILES} +beforeinstall: nm -o lib${LIB}.a | egrep -w 'printf|fprintf' && \ (echo please fix stdio usage in this library; false) || true .for p in ${PC_FILES} -- cgit v1.2.3-55-g6feb