Currently pkg-config files are generated at install time, while they
should be generated at build time like everything else. One reason why
generating files during install is bad is that the two steps might be
run by two differnt users, resulting in permission problems.

While there I removed the dependency from the install target on the
pkg-config files as this is also not done for libraries and programs.
If you didn't build before install you are fucked anyway.

Ok?

natano


Index: lib/libcrypto/Makefile
===================================================================
RCS file: /cvs/src/lib/libcrypto/Makefile,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile
--- lib/libcrypto/Makefile      11 Sep 2016 14:31:02 -0000      1.5
+++ lib/libcrypto/Makefile      12 Sep 2016 18:19:53 -0000
@@ -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/
 
Index: lib/libexpat/Makefile
===================================================================
RCS file: /cvs/src/lib/libexpat/Makefile,v
retrieving revision 1.10
diff -u -p -r1.10 Makefile
--- lib/libexpat/Makefile       4 Sep 2016 09:54:25 -0000       1.10
+++ lib/libexpat/Makefile       12 Sep 2016 18:20:08 -0000
@@ -17,10 +17,11 @@ includes:
          ${INSTALL} ${INSTALL_COPY} -m 444 -o $(BINOWN) -g $(BINGRP) \
          ${.CURDIR}/lib/expat_external.h 
${DESTDIR}/usr/include/expat_external.h
 
+all: ${PC_FILES}
 ${PC_FILES}: lib/expat.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/
 
Index: lib/libfuse/Makefile
===================================================================
RCS file: /cvs/src/lib/libfuse/Makefile,v
retrieving revision 1.9
diff -u -p -r1.9 Makefile
--- lib/libfuse/Makefile        4 Sep 2016 09:54:25 -0000       1.9
+++ lib/libfuse/Makefile        12 Sep 2016 18:20:16 -0000
@@ -29,10 +29,11 @@ includes:
                eval "$$j"; \
        done
 
+all: ${PC_FILES}
 ${PC_FILES}: fuse_private.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/
 
Index: lib/libssl/Makefile
===================================================================
RCS file: /cvs/src/lib/libssl/Makefile,v
retrieving revision 1.21
diff -u -p -r1.21 Makefile
--- lib/libssl/Makefile 4 Sep 2016 09:54:25 -0000       1.21
+++ lib/libssl/Makefile 12 Sep 2016 18:20:34 -0000
@@ -48,10 +48,11 @@ includes:
 
 .include <bsd.lib.mk>
 
+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}
Index: lib/libz/Makefile
===================================================================
RCS file: /cvs/src/lib/libz/Makefile,v
retrieving revision 1.19
diff -u -p -r1.19 Makefile
--- lib/libz/Makefile   4 Sep 2016 09:54:25 -0000       1.19
+++ lib/libz/Makefile   12 Sep 2016 18:20:44 -0000
@@ -19,10 +19,11 @@ includes:
                eval "$$j"; \
        done
 
+all: ${PC_FILES}
 ${PC_FILES}: zlib.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/
 

Reply via email to