diff options
author | natano <> | 2016-09-14 06:26:03 +0000 |
---|---|---|
committer | natano <> | 2016-09-14 06:26:03 +0000 |
commit | ceac7d2c6e91336c8238cc1345fe787251561abb (patch) | |
tree | 38b82c0c0f1f714d4304104f6700ad7c8f9f1551 /src | |
parent | ec28f07967d280a912717c229dc810fb3610d140 (diff) | |
download | openbsd-ceac7d2c6e91336c8238cc1345fe787251561abb.tar.gz openbsd-ceac7d2c6e91336c8238cc1345fe787251561abb.tar.bz2 openbsd-ceac7d2c6e91336c8238cc1345fe787251561abb.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/Makefile | 5 | ||||
-rw-r--r-- | src/lib/libssl/Makefile | 5 |
2 files changed, 6 insertions, 4 deletions
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 @@ | |||
1 | # $OpenBSD: Makefile,v 1.5 2016/09/11 14:31:02 natano Exp $ | 1 | # $OpenBSD: Makefile,v 1.6 2016/09/14 06:26:02 natano Exp $ |
2 | 2 | ||
3 | LIB= crypto | 3 | LIB= crypto |
4 | 4 | ||
@@ -431,10 +431,11 @@ distribution: | |||
431 | ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \ | 431 | ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \ |
432 | ${.CURDIR}/x509v3.cnf ${DESTDIR}/etc/ssl/x509v3.cnf | 432 | ${.CURDIR}/x509v3.cnf ${DESTDIR}/etc/ssl/x509v3.cnf |
433 | 433 | ||
434 | all: ${PC_FILES} | ||
434 | ${PC_FILES}: opensslv.h | 435 | ${PC_FILES}: opensslv.h |
435 | /bin/sh ${.CURDIR}/generate_pkgconfig.sh -c ${.CURDIR} -o ${.OBJDIR} | 436 | /bin/sh ${.CURDIR}/generate_pkgconfig.sh -c ${.CURDIR} -o ${.OBJDIR} |
436 | 437 | ||
437 | beforeinstall: ${PC_FILES} | 438 | beforeinstall: |
438 | ${INSTALL} ${INSTALL_COPY} -o root -g ${SHAREGRP} \ | 439 | ${INSTALL} ${INSTALL_COPY} -o root -g ${SHAREGRP} \ |
439 | -m ${SHAREMODE} ${.OBJDIR}/${PC_FILES} ${DESTDIR}/usr/lib/pkgconfig/ | 440 | -m ${SHAREMODE} ${.OBJDIR}/${PC_FILES} ${DESTDIR}/usr/lib/pkgconfig/ |
440 | 441 | ||
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 @@ | |||
1 | # $OpenBSD: Makefile,v 1.21 2016/09/04 09:54:25 natano Exp $ | 1 | # $OpenBSD: Makefile,v 1.22 2016/09/14 06:26:03 natano Exp $ |
2 | 2 | ||
3 | SUBDIR= man | 3 | SUBDIR= man |
4 | PC_FILES=openssl.pc libssl.pc | 4 | PC_FILES=openssl.pc libssl.pc |
@@ -48,10 +48,11 @@ includes: | |||
48 | 48 | ||
49 | .include <bsd.lib.mk> | 49 | .include <bsd.lib.mk> |
50 | 50 | ||
51 | all: ${PC_FILES} | ||
51 | ${PC_FILES}: ${.CURDIR}/../libcrypto/opensslv.h | 52 | ${PC_FILES}: ${.CURDIR}/../libcrypto/opensslv.h |
52 | /bin/sh ${.CURDIR}/generate_pkgconfig.sh -c ${.CURDIR} -o ${.OBJDIR} | 53 | /bin/sh ${.CURDIR}/generate_pkgconfig.sh -c ${.CURDIR} -o ${.OBJDIR} |
53 | 54 | ||
54 | beforeinstall: ${PC_FILES} | 55 | beforeinstall: |
55 | nm -o lib${LIB}.a | egrep -w 'printf|fprintf' && \ | 56 | nm -o lib${LIB}.a | egrep -w 'printf|fprintf' && \ |
56 | (echo please fix stdio usage in this library; false) || true | 57 | (echo please fix stdio usage in this library; false) || true |
57 | .for p in ${PC_FILES} | 58 | .for p in ${PC_FILES} |