xref: /freebsd/usr.sbin/config/configvers.h (revision 734e82fe33aa764367791a7d603b383996c6b40b)
1 /*-
2  * This file is in the public domain
3  */
4 
5 /*
6  * 6 digits of version.  The most significant are branch indicators at the
7  * time when the last incompatible change was made (which is why it is
8  * presently 6 on 7-current).  The least significant digits are incremented
9  * as described below.  The format is similar to the __FreeBSD_version, but
10  * not tied to it.
11  *
12  * DO NOT CASUALLY BUMP THIS NUMBER!  The rules are not the same as shared
13  * libs or param.h/osreldate.
14  *
15  * It is the version number of the protocol between config(8) and the
16  * sys/conf/ Makefiles (the kernel build system).
17  *
18  * It is now also used to trap certain problems that the syntax parser cannot
19  * detect.
20  *
21  * Unfortunately, there is no version number for user supplied config files.
22  *
23  * Once, config(8) used to silently report errors and continue anyway.  This
24  * was a huge problem for 'make buildkernel' which was run with the installed
25  * /usr/sbin/config, not a cross built one.  We started bumping the version
26  * number as a way to trap cases where the previous installworld was not
27  * compatible with the new buildkernel.  The buildtools phase and much more
28  * comprehensive error code returns solved this original problem.
29  *
30  * Most end-users will use buildkernel and the build tools from buildworld.
31  * The people that are inconvenienced by gratuitous bumps are developers
32  * who run config by hand.  However, developers shouldn't gratuitously be
33  * inconvenienced.
34  *
35  * One should bump the CONFIGVERS in the following ways:
36  *
37  * (1) If you change config such that it won't read old config files,
38  *     then bump the major number.  You shouldn't be doing this unless
39  *     you are overhauling config.  Do not casually bump this number
40  *     and by implication do not make changes that would force a bump
41  *     of this number casually.  You should limit major bumps to once
42  *     per branch.
43  * (2) For each new feature added, bump the minor version of this file.
44  *     When a new feature is actually used by the build system, update the
45  *     %VERSREQ field in the Makefile.$ARCH of all the affected makefiles
46  *     (typically all of them).
47  */
48 #define	CONFIGVERS	600018
49 #define	MAJOR_VERS(x)	((x) / 100000)
50 
51 /* Last config(8) version to require envmode/hintmode */
52 #define	CONFIGVERS_ENVMODE_REQ	600015
53