Module Name: src Committed By: riastradh Date: Sat Mar 23 21:56:47 UTC 2024
Modified Files: src/share/mk: bsd.README bsd.lib.mk Log Message: bsd.lib.mk: Tidy up expected symbols check a little. Add some documentation in bsd.README. To generate a diff of this commit: cvs rdiff -u -r1.445 -r1.446 src/share/mk/bsd.README cvs rdiff -u -r1.395 -r1.396 src/share/mk/bsd.lib.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.README diff -u src/share/mk/bsd.README:1.445 src/share/mk/bsd.README:1.446 --- src/share/mk/bsd.README:1.445 Sat Jul 22 18:50:31 2023 +++ src/share/mk/bsd.README Sat Mar 23 21:56:47 2024 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.README,v 1.445 2023/07/22 18:50:31 lukem Exp $ +# $NetBSD: bsd.README,v 1.446 2024/03/23 21:56:47 riastradh Exp $ # @(#)bsd.README 8.2 (Berkeley) 4/2/94 This is the README file for the make "include" files for the NetBSD @@ -993,6 +993,20 @@ PROGDPLIBS A list of the tuples: as well as in parent directories to cache common libraries as a build-time optimization. +LIB_EXPSYM File listing all symbols expected to be defined by the + library. Each line has a single symbol. If the symbol + is versioned, it is followed by `@@', if it is the + default version, or `@', if not, and the symbol + version. The lines must be sorted in LANG=C. + + bsd.lib.mk checks to make sure exactly the set of + symbols in this file is defined when the library is + built; if not, the build will fail and print a diff + from the expected symbols to the actual symbols. + During development, you can update the expected symbols + from the actual ones with `make update-symbols'. + + The include file <bsd.lib.mk> includes the file named "../Makefile.inc" if it exists, as well as the include file <bsd.man.mk>. Index: src/share/mk/bsd.lib.mk diff -u src/share/mk/bsd.lib.mk:1.395 src/share/mk/bsd.lib.mk:1.396 --- src/share/mk/bsd.lib.mk:1.395 Wed Mar 20 13:50:37 2024 +++ src/share/mk/bsd.lib.mk Sat Mar 23 21:56:47 2024 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.lib.mk,v 1.395 2024/03/20 13:50:37 riastradh Exp $ +# $NetBSD: bsd.lib.mk,v 1.396 2024/03/23 21:56:47 riastradh Exp $ # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 .include <bsd.init.mk> @@ -672,7 +672,7 @@ ${_LIB.so.full}.diffsym: ${LIB_EXPSYM} $ ${_LIB.so.full}.actsym: ${_LIB.so.full} ${_MKTARGET_CREATE} ${NM} --dynamic --extern-only --defined-only --with-symbol-versions \ - ${_LIB.so.full} \ + ${.ALLSRC} \ | cut -d' ' -f3 | LANG=C sort -u >${.TARGET}.tmp ${MV} ${.TARGET}.tmp ${.TARGET} CLEANFILES+= ${_LIB.so.full}.actsym @@ -681,7 +681,7 @@ CLEANFILES+= ${_LIB.so.full}.diffsym CLEANFILES+= ${_LIB.so.full}.diffsym.tmp update-symbols: .PHONY update-symbols: ${_LIB.so.full}.actsym - cp ${_LIB.so.full}.actsym ${.CURDIR}/${LIB}.expsym + cp ${.ALLSRC} ${.CURDIR}/${LIB_EXPSYM} .endif .if !empty(LOBJS) # {