Module Name: src
Committed By: riastradh
Date: Thu Oct 31 15:04:11 UTC 2024
Modified Files:
src/share/mk: bsd.lib.mk
Log Message:
bsd.lib.mk: Let update-symbols know about ro vs rw source trees.
The update-symbols target is a tool for developers to update the
foo.expsym files from the actual list of exported symbols.
But if you have
/home/dev/netbsd/src
as a read-only null-mount of your real read/write source tree
/home/dev/netbsd/src.hg
as I do (in order to detect accidental writes to the srcdir which
should have gone to the objdir), `make update-symbols' doesnt work
because it tries to write to the read-only null mount.
With this change,
make update-symbols NETBSDSRCDIR_RW=/home/dev/netbsd/src.hg
will write instead to the read/write source tree.
To generate a diff of this commit:
cvs rdiff -u -r1.407 -r1.408 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.lib.mk
diff -u src/share/mk/bsd.lib.mk:1.407 src/share/mk/bsd.lib.mk:1.408
--- src/share/mk/bsd.lib.mk:1.407 Fri Jun 28 21:58:24 2024
+++ src/share/mk/bsd.lib.mk Thu Oct 31 15:04:11 2024
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.lib.mk,v 1.407 2024/06/28 21:58:24 riastradh Exp $
+# $NetBSD: bsd.lib.mk,v 1.408 2024/10/31 15:04:11 riastradh Exp $
# @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94
.include <bsd.init.mk>
@@ -707,7 +707,7 @@ CLEANFILES+= ${_LIB.so.full}.diffsym
CLEANFILES+= ${_LIB.so.full}.diffsym.tmp
update-symbols: .PHONY
update-symbols: ${_LIB.so.full}.actsym
- cp ${.ALLSRC} ${.CURDIR}/${LIB_EXPSYM}
+ cp ${.ALLSRC} ${defined(NETBSDSRCDIR_RW):?${.CURDIR:C,^${NETBSDSRCDIR}/,${NETBSDSRCDIR_RW}/,}:${.CURDIR}}/${LIB_EXPSYM}
.endif
.if !empty(LOBJS) # {