configvers.h revision 206915
166458Sdfr/*-
2135590Smarcel * This file is in the public domain
366458Sdfr *
466458Sdfr * $FreeBSD: head/usr.sbin/config/configvers.h 206915 2010-04-20 20:36:38Z imp $
566458Sdfr */
666458Sdfr
766458Sdfr/*
866458Sdfr * 6 digits of version.  The most significant are branch indicators at the
966458Sdfr * time when the last incompatible change was made (which is why it is
1066458Sdfr * presently 6 on 7-current).  The least significant digits are incremented
1166458Sdfr * as described below.  The format is similar to the __FreeBSD_version, but
1266458Sdfr * not tied to it.
1366458Sdfr *
1466458Sdfr * DO NOT CASUALLY BUMP THIS NUMBER!  The rules are not the same as shared
1566458Sdfr * libs or param.h/osreldate.
1666458Sdfr *
1766458Sdfr * It is the version number of the protocol between config(8) and the
1866458Sdfr * sys/conf/ Makefiles (the kernel build system).
1966458Sdfr *
2066458Sdfr * It is now also used to trap certain problems that the syntax parser cannot
2166458Sdfr * detect.
2266458Sdfr *
2366458Sdfr * Unfortunately, there is no version number for user supplied config files.
2466458Sdfr *
2566458Sdfr * Once, config(8) used to silently report errors and continue anyway.  This
2666458Sdfr * was a huge problem for 'make buildkernel' which was run with the installed
2766458Sdfr * /usr/sbin/config, not a cross built one.  We started bumping the version
2866458Sdfr * number as a way to trap cases where the previous installworld was not
29135783Smarcel * compatable with the new buildkernel.  The buildtools phase and much more
30135783Smarcel * comprehensive error code returns solved this original problem.
31199502Smarcel *
32171665Smarcel * Most end-users will use buildkernel and the build tools from buildworld.
3383906Sdfr * The people that are inconvenienced by gratuitous bumps are developers
3466458Sdfr * who run config by hand.  However, developers shouldn't gratuitously be
3566458Sdfr * inconvenienced.
3666458Sdfr *
37199566Smarcel * One should bump the CONFIGVERS in the following ways:
38199566Smarcel *
39199566Smarcel * (1) If you change config such that it won't read old config files,
40199566Smarcel *     then bump the major number.  You shouldn't be doing this unless
41199566Smarcel *     you are overhauling config.  Do not casually bump this number
42199566Smarcel *     and by implication do not make changes that would force a bump
43199566Smarcel *     of this number casually.  You should limit major bumps to once
44199566Smarcel *     per branch.
45115084Smarcel * (2) For each new feature added, bump the minor version of this file.
46115084Smarcel *     When a new feature is actually used by the build system, update the
47115084Smarcel *     %VERSREQ field in the Makefile.$ARCH of all the affected makefiles
48115084Smarcel *     (typically all of them).
4966458Sdfr *
5066458Sdfr * $FreeBSD: head/usr.sbin/config/configvers.h 206915 2010-04-20 20:36:38Z imp $
51171665Smarcel */
52171665Smarcel#define	CONFIGVERS	600008
53171665Smarcel#define	MAJOR_VERS(x)	((x) / 100000)
54171665Smarcel