configvers.h revision 269825
1284990Scy/*-
2284990Scy * This file is in the public domain
3284990Scy *
4284990Scy * $FreeBSD: stable/10/usr.sbin/config/configvers.h 269825 2014-08-11 18:42:20Z imp $
5289997Sglebius */
6284990Scy
7284990Scy/*
8284990Scy * 6 digits of version.  The most significant are branch indicators at the
9284990Scy * time when the last incompatible change was made (which is why it is
10284990Scy * presently 6 on 7-current).  The least significant digits are incremented
11284990Scy * as described below.  The format is similar to the __FreeBSD_version, but
12284990Scy * not tied to it.
13284990Scy *
14284990Scy * DO NOT CASUALLY BUMP THIS NUMBER!  The rules are not the same as shared
15284990Scy * libs or param.h/osreldate.
16284990Scy *
17284990Scy * It is the version number of the protocol between config(8) and the
18289997Sglebius * sys/conf/ Makefiles (the kernel build system).
19289997Sglebius *
20284990Scy * It is now also used to trap certain problems that the syntax parser cannot
21284990Scy * detect.
22284990Scy *
23284990Scy * Unfortunately, there is no version number for user supplied config files.
24289997Sglebius *
25289997Sglebius * Once, config(8) used to silently report errors and continue anyway.  This
26284990Scy * was a huge problem for 'make buildkernel' which was run with the installed
27289997Sglebius * /usr/sbin/config, not a cross built one.  We started bumping the version
28284990Scy * number as a way to trap cases where the previous installworld was not
29284990Scy * compatible with the new buildkernel.  The buildtools phase and much more
30284990Scy * comprehensive error code returns solved this original problem.
31289997Sglebius *
32289997Sglebius * Most end-users will use buildkernel and the build tools from buildworld.
33284990Scy * The people that are inconvenienced by gratuitous bumps are developers
34284990Scy * who run config by hand.  However, developers shouldn't gratuitously be
35289997Sglebius * inconvenienced.
36284990Scy *
37284990Scy * One should bump the CONFIGVERS in the following ways:
38284990Scy *
39284990Scy * (1) If you change config such that it won't read old config files,
40284990Scy *     then bump the major number.  You shouldn't be doing this unless
41284990Scy *     you are overhauling config.  Do not casually bump this number
42284990Scy *     and by implication do not make changes that would force a bump
43284990Scy *     of this number casually.  You should limit major bumps to once
44284990Scy *     per branch.
45284990Scy * (2) For each new feature added, bump the minor version of this file.
46284990Scy *     When a new feature is actually used by the build system, update the
47284990Scy *     %VERSREQ field in the Makefile.$ARCH of all the affected makefiles
48284990Scy *     (typically all of them).
49284990Scy *
50289997Sglebius * $FreeBSD: stable/10/usr.sbin/config/configvers.h 269825 2014-08-11 18:42:20Z imp $
51284990Scy */
52284990Scy#define	CONFIGVERS	600013
53284990Scy#define	MAJOR_VERS(x)	((x) / 100000)
54284990Scy