Ignore machine-check MSRs
[freebsd-src/fkvm-freebsd.git] / tools / build / options / makeman
blobc3c87585cb6c0f003f642066d32da80a18baea8d
1 #!/bin/sh
3 # This file is in the public domain.
5 ident='$FreeBSD$'
8 # usage: show { settings | options } ...
10 show()
13 mode=$1; shift
14 case ${mode} in
15 settings)
16 yes_prefix=WITH
17 no_prefix=WITHOUT
19 options)
20 yes_prefix=WITHOUT
21 no_prefix=WITH
24 echo "internal error" >/dev/stderr
25 exit 1
27 esac
29 cd ../../..
30 make "$@" showconfig SRCCONF=/dev/null __MAKE_CONF=/dev/null
31 ) |
32 while read var _ val; do
33 opt=${var#MK_}
34 case ${val} in
35 yes)
36 echo ${yes_prefix}_${opt}
38 no)
39 echo ${no_prefix}_${opt}
42 echo "make showconfig broken" >/dev/stderr
43 exit 1
45 esac
46 done
49 main()
52 trap 'rm -f _defcfg _config _config2 _deps _deps2' exit
53 ident=${ident#$}
54 ident=${ident% $}
55 fbsdid='$'FreeBSD'$'
56 cat <<EOF
57 .\" DO NOT EDIT-- this file is automatically generated.
58 .\" from ${ident}
59 .\" ${fbsdid}
60 .Dd $(LC_TIME=C date +'%B %e, %Y')
61 .Dt SRC.CONF 5
62 .Os
63 .Sh NAME
64 .Nm src.conf
65 .Nd "source build options"
66 .Sh DESCRIPTION
67 The
68 .Nm
69 file contains settings that will apply to every build involving the
70 .Fx
71 source tree; see
72 .Xr build 7 .
73 .Pp
74 The
75 .Nm
76 file uses the standard makefile syntax.
77 However,
78 .Nm
79 should not specify any dependencies to
80 .Xr make 1 .
81 Instead,
82 .Nm
83 is to set
84 .Xr make 1
85 variables that control the aspects of how the system builds.
86 .Pp
87 The default location of
88 .Nm
90 .Pa /etc/src.conf ,
91 though an alternative location can be specified in the
92 .Xr make 1
93 variable
94 .Va SRCCONF .
95 Overriding the location of
96 .Nm
97 may be necessary if the system-wide settings are not suitable
98 for a particular build.
99 For instance, setting
100 .Va SRCCONF
102 .Pa /dev/null
103 effectively resets all build controls to their defaults.
105 The only purpose of
107 is to control the compilation of the
109 source code, which is usually located in
110 .Pa /usr/src .
111 As a rule, the system administrator creates
113 when the values of certain control variables need to be changed
114 from their defaults.
116 In addition, control variables can be specified
117 for a particular build via the
118 .Fl D
119 option of
120 .Xr make 1
121 or in environment; see
122 .Xr environ 7 .
124 The values of variables are ignored regardless of their setting;
125 even if they would be set to
126 .Dq Li FALSE
128 .Dq Li NO .
129 Just the existence of an option will cause
130 it to be honoured by
131 .Xr make 1 .
133 The following list provides a name and short description for variables
134 that can be used for source builds.
135 .Bl -tag -width indent
137 show settings |sort >_defcfg
138 show options |
139 while read opt; do
140 if [ -f ${opt} ]; then
141 cat <<EOF
142 .It Va ${opt}
144 sed -e's/\$\(FreeBSD: .*\) \$/from \1/' ${opt}
145 else
146 echo "no description found for ${opt}, skipping" >/dev/stderr
147 continue
149 show settings -D${opt} |sort >_config
150 comm -13 _defcfg _config |grep -v "^${opt}$" >_deps
151 if [ -s _deps ]; then
152 cat <<EOF
153 When set, it also enforces the following options:
155 .Bl -item -compact
157 cat _deps |while read opt2; do
158 cat <<EOF
160 .Va ${opt2}
162 show settings -D${opt} $(
163 echo ${opt2} |
164 sed -e's/^WITHOUT_/-DWITH_/' -e's/^WITH_/-DWITHOUT_/'
165 ) |sort >_config2
166 comm -13 _config _config2 >_deps2
167 if [ -s _deps2 ]; then
168 cat <<EOF
169 (can be overridden with
170 .Va $(cat _deps2) )
173 done
174 cat <<EOF
178 done
179 cat <<EOF
181 .Sh FILES
182 .Bl -tag -compact
183 .It Pa /etc/src.conf
184 .It Pa /usr/share/mk/bsd.own.mk
186 .Sh SEE ALSO
187 .Xr make 1 ,
188 .Xr make.conf 5 ,
189 .Xr build 7 ,
190 .Xr ports 7
191 .Sh HISTORY
194 file appeared in
195 .Fx 7.0 .
196 .Sh AUTHORS
197 This manual page was autogenerated.
201 main