Module Name: src Committed By: riastradh Date: Tue Jan 14 19:44:43 UTC 2025
Modified Files: src/share/mk: bsd.prog.mk Log Message: bsd.prog.mk: Define and cache LIBDO.${_lib} for PROGDPLIBS. Don't define PROGDO.${_lib} and then check for BINDO.${_lib}. LIBDO is what is documented in bsd.README; this makes more sense in context than PROGDO or BINDO -- LIBDO.foo is the objdir for the _library_ foo. Should reduce build cost in submakes for programs that link against libraries with PROGDPLIBS. To generate a diff of this commit: cvs rdiff -u -r1.352 -r1.353 src/share/mk/bsd.prog.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/share/mk/bsd.prog.mk diff -u src/share/mk/bsd.prog.mk:1.352 src/share/mk/bsd.prog.mk:1.353 --- src/share/mk/bsd.prog.mk:1.352 Sat Nov 2 22:02:39 2024 +++ src/share/mk/bsd.prog.mk Tue Jan 14 19:44:43 2025 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.prog.mk,v 1.352 2024/11/02 22:02:39 christos Exp $ +# $NetBSD: bsd.prog.mk,v 1.353 2025/01/14 19:44:43 riastradh Exp $ # @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94 .ifndef HOSTPROG @@ -385,21 +385,21 @@ PROGS= ${PROG} ##### Libraries that this may depend upon. .if defined(PROGDPLIBS) # { .for _lib _dir in ${PROGDPLIBS} -.if !defined(BINDO.${_lib}) -PROGDO.${_lib}!= cd "${_dir}" && ${PRINTOBJDIR} -.MAKEOVERRIDES+=PROGDO.${_lib} +.if !defined(LIBDO.${_lib}) +LIBDO.${_lib}!= cd "${_dir}" && ${PRINTOBJDIR} +.MAKEOVERRIDES+=LIBDO.${_lib} .endif .if defined(PROGDPLIBSSTATIC) -DPADD+= ${PROGDO.${_lib}}/lib${_lib}.a -LDADD+= ${PROGDO.${_lib}}/lib${_lib}.a +DPADD+= ${LIBDO.${_lib}}/lib${_lib}.a +LDADD+= ${LIBDO.${_lib}}/lib${_lib}.a .else -LDADD+= -L${PROGDO.${_lib}} -l${_lib} -.if exists(${PROGDO.${_lib}}/lib${_lib}_pic.a) -DPADD+= ${PROGDO.${_lib}}/lib${_lib}_pic.a -.elif exists(${PROGDO.${_lib}}/lib${_lib}.so) -DPADD+= ${PROGDO.${_lib}}/lib${_lib}.so +LDADD+= -L${LIBDO.${_lib}} -l${_lib} +.if exists(${LIBDO.${_lib}}/lib${_lib}_pic.a) +DPADD+= ${LIBDO.${_lib}}/lib${_lib}_pic.a +.elif exists(${LIBDO.${_lib}}/lib${_lib}.so) +DPADD+= ${LIBDO.${_lib}}/lib${_lib}.so .else -DPADD+= ${PROGDO.${_lib}}/lib${_lib}.a +DPADD+= ${LIBDO.${_lib}}/lib${_lib}.a .endif .endif .endfor