Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src
Module Name: src
Committed By: riastradh
Date: Wed May 29 02:06:46 UTC 2024
Modified Files:
src/share/man/man5: mk.conf.5
src/share/mk: bsd.own.mk
src/sys/sys: cdefs_aout.h cdefs_elf.h
Log Message:
New make(1) variable NETBSD_REVISIONID in the NetBSD build.
This is intended to be a tree-wide revision identifier, like a commit
hash or similar. This way, in builds from non-CVS trees where
per-file $NetBSD$ revision ids aren't incremented, we can still track
some version provenance of files with ident(1).
If defined, bsd.own.mk adds a macro _NETBSD_REVISIONID to CPPFLAGS
with the stringified text of NETBSD_REVISIONID.
In turn, if _NETBSD_REVISIONID is defined in sys/cdefs.h, then
__RCSID will put the concatenation of:
- `$NetBSD: '
- the file name
- ` '
- _NETBSD_REVISIONID
- ` $'
alongside the per-file revision id passed as an argument to __RCSID.
Since this is passed through command-line arguments, it doesn't cause
make to consider any dependencies to change when the revision id
changes -- so incremental builds remain incremental. And if you
don't set it, nothing changes from the __RCSID we had before.
Currently nothing sets NETBSD_REVISIONID automatically yet -- subject
to experimentation. Could just be verbatim commit hash, or could be
longer `hg identify' output -- or, in git, with the help of tags,
could be `git describe --dirty' output like
10.99.10-2924-gd01834fb75de
(or `10.99.10-2924-gd01834fb75de-dirty' if the working tree is dirty)
for the commit at
https://mail-index.netbsd.org/source-changes/2024/05/24/msg151526.html
which is 2924 linear commits after the commit bumping sys/param.h to
10.99.10 and (in the current git conversion) had commit hash starting
with d01834fb75de. This may require some discipline around branching
and tagging but it's worth a shot -- we'll see.
Based on a patch from joerg@ a while ago.
To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/share/man/man5/mk.conf.5
cvs rdiff -u -r1.1373 -r1.1374 src/share/mk/bsd.own.mk
cvs rdiff -u -r1.20 -r1.21 src/sys/sys/cdefs_aout.h
cvs rdiff -u -r1.58 -r1.59 src/sys/sys/cdefs_elf.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index