build: add "make backupworld" and "make restoreworld" functionality
[dragonfly.git] / share / man / man5 / make.conf.5
CommitLineData
984263bc
MD
1.\" Copyright (c) 2000
2.\" Mike W. Meyer
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\" notice, this list of conditions and the following disclaimer in the
11.\" documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD: src/share/man/man5/make.conf.5,v 1.12.2.30 2003/05/18 17:05:55 brueffer Exp $
26.\"
7bee86c0 27.Dd February 17, 2013
984263bc
MD
28.Dt MAKE.CONF 5
29.Os
30.Sh NAME
31.Nm make.conf
32.Nd system build information
33.Sh DESCRIPTION
34The file
35.Nm
36contains settings that control the compilation of the
9bb2a92d 37.Dx
cecff5c1 38sources.
984263bc
MD
39The file
40.Nm
41is generally created by the system administrator when the values need
42to be changed from their defaults.
43.Pp
44The purpose of
45.Nm
46is not to run commands or perform compilation actions
47directly.
cecff5c1 48Instead, it is included by the various makefiles in
0cd7b3a7 49.Pa /usr/src
cecff5c1
MD
50which conditionalize their internal actions according to the settings
51found there.
984263bc
MD
52.Pp
53The
54.Pa /etc/make.conf
55file is included from the appropriate
56.Pa Makefile
57which specifies the default settings for all the available options.
58Options need only be specified in
59.Pa /etc/make.conf
60when the system administrator wishes to override these defaults.
61.Pp
cecff5c1
MD
62The build procedures occur in three areas: world, kernel, and
63documentation.
984263bc
MD
64Variables set in
65.Nm
cecff5c1 66may be applicable during builds in one, two, or all of these areas.
984263bc
MD
67They may be specified for a particular build via the
68.Fl D
69option of
70.Xr make 1 .
71.Pp
72The following lists provide a name and short description for each
73variable you can use during the indicated builds.
cecff5c1 74The values of variables flagged as
984263bc 75.Vt bool
cecff5c1 76are ignored; the variable being set at all (even to
984263bc
MD
77.Dq Li FALSE
78or
79.Dq Li NO )
cecff5c1 80causes it to be treated as if it were set.
984263bc
MD
81.Pp
82The following list provides a name and short description for variables
83that are used for all builds, or are used by the
84.Pa makefiles
85for things other than builds.
86.Bl -tag -width Ar
984263bc
MD
87.It Va CPUTYPE
88.Pq Vt str
cecff5c1
MD
89Controls which processor should be targeted for generated code.
90This controls processor-specific optimizations in certain code
91(currently only OpenSSL) as well as modifying the value of
984263bc
MD
92.Va CFLAGS
93and
94.Va COPTFLAGS
95to contain the appropriate optimization directive to
96.Xr gcc 1 .
97The automatic setting of
98.Va CFLAGS
99and
100.Va COPTFLAGS
101may be overridden using the
102.Va NO_CPU_CFLAGS
103and
104.Va NO_CPU_COPTFLAGS
105variables, respectively. Refer to
0cd7b3a7 106.Pa /usr/share/examples/etc/defaults/make.conf
984263bc
MD
107for a list of recognized
108.Va CPUTYPE
109options.
cecff5c1
MD
110.It Va CCVER
111.Pq Vt str
05664f8a
PA
112Controls which GCC version to use by default.
113It should be set as
114.Li CCVER?=
115so as not to interfere with overrides from userland.
116We currently recommend that an override NOT be set in
cecff5c1 117.Pa /etc/make.conf .
e20d3103
SW
118Currently accepted values for compilers which are part of
119.Dx
120are
30c91f0c 121.Dq gcc44
c06d54ec
SW
122and
123.Dq gcc47
30c91f0c 124(default).
e20d3103
SW
125All other values will handled according to the settings in
126.Xr compilers.conf 5 .
7bee86c0
JM
127.It Va WORLD_CCVER
128.Pq Vt str
129Controls which version of GCC builds the base system, including
130the kernel.
131.Dq gcc47
132is the default value.
133.It Va LDVER
134.Pq Vt str
135Controls which linker to use by default. Currently accepted
136values are
137.Dq ld.gold
138(GNU Gold linker) and
139.Dq ld.bfd
140(default).
141.It Va WORLD_LDVER
142.Pq Vt str
143Controls which linker builds the base system, including
144the kernel.
145.Dq ld.bfd
146is the default value.
e20d3103
SW
147.It Va BINUTILSVER
148.Pq Vt str
149Controls which binutils to use by default.
150Currently accepted values are
1c05bfaa 151.Dq binutils221
e685772e
JM
152and
153.Dq binutils222
b1242318 154(default).
7bee86c0
JM
155.It Va WORLD_BINUTILSVER
156.Pq Vt str
157Controls which version of binutils builds the base system, including
158the kernel.
159.Dq binutils222
160is the default value.
cecff5c1
MD
161.It Va CFLAGS
162.Pq Vt str
163Controls the compiler setting when compiling C code.
164Optimization levels above
165.Fl O
166.Pq Fl O2 , No ...
167are not supported.
168.Va BDECFLAGS
169is provided as a set of
170.Xr gcc 1
171settings suggested by
172.An "Bruce Evans" Aq bde@FreeBSD.org
173for developing and testing changes.
174They can be used, if set, by:
cecff5c1
MD
175.Bd -literal -offset indent
176CFLAGS+=${BDECFLAGS}
177.Ed
e20d3103
SW
178.It Va DEBUG_FLAGS
179.Pq Vt str
180Similar to
181.Va CFLAGS
182but it will cause
183.Va STRIP
184to be set to a blank value, if set.
185Typically,
186.Va DEBUG_FLAGS
187is set to
188.Fl g
189for compiling with debug symbols.
984263bc
MD
190.It Va NO_CPU_CFLAGS
191.Pq Vt str
192Setting this variable will prevent CPU specific compiler flags
193from being automatically added to
194.Va CFLAGS
195during compile time.
984263bc
MD
196.It Va CXXFLAGS
197.Pq Vt str
198Controls the compiler settings when compiling C++ code.
199.Va CXXFLAGS
200is initially set to the value of
201.Va CFLAGS .
cecff5c1 202If you want to add to the
984263bc
MD
203.Va CXXFLAGS
204value, use
205.Dq Li +=
206instead of
207.Dq Li = .
208.It Va INSTALL
209.Pq Vt str
210the default install command.
cecff5c1 211To have components compared before doing the install, use
984263bc
MD
212.Bd -literal -offset indent
213INSTALL="install -C"
214.Ed
7bee86c0
JM
215.It Va WORLD_BACKUP
216.Pq Vt str
217defines where system binaries will be backed up for the
218.Dq make backupworld
219target. The default value is
220.Dq /var/backups/world_binaries .
221.It Va DAYS_BACKUP
222.Pq Vt int
223If the last world backup is older than the number of days
224defined here, the
225.Dq make installworld
226will fail with an appropriate message.
227.Dq 28
228is the default value.
229.It Va NO_BACKUP
230.Pq Vt bool
231Set this to skip the existence and currency checks for world
232binary backups.
984263bc
MD
233.It Va LOCAL_DIRS
234.Pq Vt str
cecff5c1 235List any directories that should be entered when running make
984263bc
MD
236.Pa /usr/src
237in this variable.
238.It Va MAKE_SHELL
239.Pq Vt str
240Controls the shell used internally by
241.Xr make 1
242to process the command scripts in makefiles.
243.Xr sh 1 ,
244.Xr ksh 1 ,
245and
246.Xr csh 1
247all currently supported.
248.Bd -literal -offset indent
249MAKE_SHELL?=sh
250.Ed
cecff5c1
MD
251.It Va MODULES_OVERRIDE
252.Pq Vt str
253Set to a list of modules to build instead of all of them.
984263bc
MD
254.It Va MTREE_FOLLOWS_SYMLINKS
255.Pq Vt str
256Set this to
257.Dq Fl L
258to cause
259.Xr mtree 8
260to follow symlinks.
cecff5c1
MD
261.It Va STRIP
262.Pq Vt str
e20d3103 263Set this to the flag to pass to the
cecff5c1
MD
264.Xr strip 1
265command.
e20d3103
SW
266If set to a blank value, debug symbols will not be removed.
267.Va STRIP
268is automatically set to a blank value if
269.Va DEBUG_FLAGS
270is set.
ed5d5720
PA
271.It Va WANT_HESIOD
272.Pq Vt bool
273Set this to build
274.Xr hesiod 3
275support into libc.
276.It Va NO_NS_CACHING
277.Pq Vt bool
278Set this to disable name caching in the nsswitch subsystem.
279The generic caching daemon,
280.Xr nscd 8 ,
281will not be built either if this option is set.
18c2eecf
SS
282.It Va NO_WERROR
283Set this if you don't want
284.Fl Werror
285to be added to
74facaa5
SW
286.Va CWARNFLAGS
287or used in the kernel build.
003525a9
AP
288.It Va STATIC_LOCALES
289.Pq Vt str
290Set to a list of locales to build into statically-linked binaries.
24b4fe1f 291Currently supported locales are: BIG5 EUC EUCTW ISO2022 MSKanji UTF8
984263bc
MD
292.El
293.Pp
294The following list provides a name and short description for variables
295that are only used doing a kernel build:
296.Bl -tag -width Ar
297.It Va BOOT_COMCONSOLE_PORT
298.Pq Vt str
299The port address to use for the console if the boot blocks have
300been configured to use a serial console instead of the keyboard/video card.
301.It Va BOOT_COMCONSOLE_SPEED
302.Pq Vt int
303The baud rate to use for the console if the boot blocks have
304been configured to use a serial console instead of the keyboard/video card.
984263bc
MD
305.It Va COPTFLAGS
306.Pq Vt str
307Controls the compiler settings when building the
308kernel.
309Optimization levels above
7879b9ff
SW
310.Fl O
311.Pq Fl O2 , No ...
984263bc
MD
312are not guaranteed to work.
313.It Va KERNCONF
314.Pq Vt str
315Controls which kernel configurations will be
316built by
317.Dq Li "${MAKE} buildkernel"
318and installed by
319.Dq Li "${MAKE} installkernel" .
320For example,
321.Bd -literal -offset indent
322KERNCONF=MINE DEBUG GENERIC OTHERMACHINE
323.Ed
324.Pp
325will build the kernels specified by the config files
326.Pa MINE , DEBUG , GENERIC ,
327and
328.Pa OTHERMACHINE ,
329and install the kernel specified by the config file
330.Pa MINE .
331It defaults to
332.Pa GENERIC .
cecff5c1 333.It Va NO_CPU_COPTFLAGS
984263bc 334.Pq Vt str
cecff5c1
MD
335Setting this variable will prevent CPU specific compiler flags
336from being automatically added to
337.Va COPTFLAGS
338during compile time.
339.It Va NO_KERNELCLEAN
340.Pq Vt bool
341Set this to skip the clean target when using
342.Dq Li "${MAKE} buildkernel" .
984263bc
MD
343.It Va NO_KERNELCONFIG
344.Pq Vt bool
345Set this to skip running
346.Xr config 8
347during
348.Dq Li "${MAKE} buildkernel" .
349.It Va NO_KERNELDEPEND
350.Pq Vt bool
351Set this to skip running
352.Dq Li "${MAKE} depend"
353during
354.Dq Li "${MAKE} buildkernel" .
9200f41c
SS
355.It Va NO_KERNEL_OLD_STRIP
356.Pq Vt bool
357Set this to skip stripping debugging symbols from old kernel and modules
358(kernel.old, modules.old) during
359.Dq Li "${MAKE} installkernel" .
984263bc
MD
360.It Va NO_MODULES
361.Pq Vt bool
362Set to not build modules with the kernel.
363.El
364.Pp
365The following list provides a name and short description for variables
366that are used during the world build:
367.Bl -tag -width Ar
984263bc
MD
368.It Va ENABLE_SUID_SSH
369.Pq Vt bool
370Set this to install
371.Xr ssh 1
372with the setuid bit turned on.
373.It Va MODULES_WITH_WORLD
374.Pq Vt bool
375Set to build modules with the system instead of the kernel.
1feb8780
SW
376.It Va NO_BINUTILS221
377.Pq Vt bool
378Set to not build the older version of binutils (2.21).
cecff5c1
MD
379.It Va NO_CRYPT
380.Pq Vt bool
381Set to not build crypto code.
382.It Va NO_CVS
383.Pq Vt bool
384Set to not build CVS.
cecff5c1
MD
385.It Va NO_GAMES
386.Pq Vt bool
387Set to not build games.
c06d54ec 388.It Va NO_GCC44
48dff0ad 389.Pq Vt bool
c06d54ec 390Set to not build the older version of GCC (4.4).
984263bc
MD
391.It Va NO_GDB
392.Pq Vt bool
393Set to not build
394.Xr gdb 1
cecff5c1
MD
395.It Va NO_LIBC_R
396.Pq Vt bool
397Set to not build
398.Nm libc_r
399(reentrant version of
400.Nm libc ) .
984263bc
MD
401.It Va NO_LPR
402.Pq Vt bool
403Set to not build
404.Xr lpr 1
405and related programs.
406.It Va NO_MAILWRAPPER
407.Pq Vt bool
408Set to not build the
409.Xr mailwrapper 8
410MTA selector.
984263bc
MD
411.It Va NO_OBJC
412.Pq Vt bool
413Set to not build Objective C support.
414.It Va NO_OPENSSH
415.Pq Vt bool
416Set to not build OpenSSH.
417.It Va NO_OPENSSL
418.Pq Vt bool
419Set to not build OpenSSL (implies
420.Va NO_OPENSSH ) .
421.It Va NO_SENDMAIL
422.Pq Vt bool
423Set to not build
424.Xr sendmail 8
425and related programs.
cecff5c1
MD
426.It Va NO_SHARE
427.Pq Vt bool
428Set to not enter the share subdirectory.
984263bc
MD
429.It Va NOCLEAN
430.Pq Vt bool
431Set this to disable cleaning during
432.Dq Li "make buildworld" .
433This should not be set unless you know what you are doing.
434.It Va NOCLEANDIR
435.Pq Vt bool
436Set this to run
437.Dq Li "${MAKE} clean"
438instead of
439.Dq Li "${MAKE} cleandir" .
cecff5c1 440.It Va NOFSCHG
984263bc 441.Pq Vt bool
566002a4 442Set to not install certain components with flag schg.
cecff5c1 443This is useful in a jailed environment.
984263bc
MD
444.It Va NOINFO
445.Pq Vt bool
446Set to not make or install
447.Xr info 5
448files.
cecff5c1 449.It Va NOINFOCOMPRESS
984263bc 450.Pq Vt bool
cecff5c1
MD
451Set to not compress the info pages.
452.It Va NOMAN
984263bc 453.Pq Vt bool
cecff5c1
MD
454Set to not build manual pages
455.It Va NOMANCOMPRESS
984263bc 456.Pq Vt bool
cecff5c1 457Set to not compress the manual pages.
984263bc
MD
458.It Va NOPROFILE
459.Pq Vt bool
460Set to avoid compiling profiled libraries.
984263bc
MD
461.It Va PPP_NOSUID
462.Pq Vt bool
463Set to disable the installation of
464.Xr ppp 8
cecff5c1 465with the set-user-ID bit on.
984263bc
MD
466.It Va SENDMAIL_MC
467.Pq Vt str
3181538d
GNS
468The default
469.Xr m4 1
470configuration file to use at install time.
984263bc
MD
471The value should include the full path to the
472.Pa .mc
473file, e.g.,
474.Pa /etc/mail/myconfig.mc .
475Use with caution as a make install will overwrite any existing
476.Pa /etc/mail/sendmail.cf .
477Note that
478.Va SENDMAIL_CF
479is now deprecated.
984263bc
MD
480.It Va SENDMAIL_SUBMIT_MC
481.Pq Vt str
3181538d
GNS
482The default
483.Xr m4 1
484configuration file for mail submission
984263bc
MD
485to use at install time.
486The value should include the full path to the
487.Pa .mc
488file, e.g.,
489.Pa /etc/mail/mysubmit.mc .
490Use with caution as a make install will overwrite any existing
491.Pa /etc/mail/submit.cf .
984263bc
MD
492.It Va SENDMAIL_ADDITIONAL_MC
493.Pq Vt str
494Additional
495.Pa .mc
496files which should be built into
497.Pa .cf
498files at build time.
499The value should include the full path to the
500.Pa .mc
501file(s), e.g.,
502.Pa /etc/mail/foo.mc
503.Pa /etc/mail/bar.mc .
3181538d
GNS
504.It Va SENDMAIL_CF_DIR
505.Pq Vt str
506Override the default location for the
507.Xr m4 1
508configuration files used to build a
509.Pa .cf
510file from a
511.Pa .mc
512file.
984263bc
MD
513.It Va SENDMAIL_M4_FLAGS
514.Pq Vt str
3181538d
GNS
515Flags passed to
516.Xr m4 1
517when building a
984263bc
MD
518.Pa .cf
519file from a
520.Pa .mc
521file.
522.It Va SENDMAIL_CFLAGS
523.Pq Vt str
524Flags to pass to the compile command when building
525.Xr sendmail 8 .
526The
527.Va SENDMAIL_*
528flags can be used to provide SASL support with setting such as:
529.Bd -literal -offset indent
530SENDMAIL_CFLAGS=-I/usr/local/include -DSASL
531SENDMAIL_LDFLAGS=-L/usr/local/lib
532SENDMAIL_LDADD=-lsasl
533.Ed
534.It Va SENDMAIL_LDFLAGS
535.Pq Vt str
536Flags to pass to the
537.Xr ld 1
538command when building
539.Xr sendmail 8 .
540.It Va SENDMAIL_LDADD
541.Pq Vt str
542Flags to add to the end of the
543.Xr ld 1
544command when building
545.Xr sendmail 8 .
546.It Va SENDMAIL_DPADD
547.Pq Vt str
548Extra dependencies to add when building
549.Xr sendmail 8 .
550.It Va SENDMAIL_SET_USER_ID
551.Pq Vt bool
552If set, install
553.Xr sendmail 8
554as a set-user-ID root binary instead of a set-group-ID binary
555and do not install
556.Pa /etc/mail/submit.{cf,mc} .
557Use of this flag is not recommended and the alternative advice in
558.Pa /etc/mail/README
3181538d 559should be followed instead if at all possible.
984263bc
MD
560.It Va SENDMAIL_MAP_PERMS
561.Pq Vt str
562Mode to use when generating alias and map database files using
563.Pa /etc/mail/Makefile .
564The default value is 0640.
587bc464
SW
565.It Va THREAD_LIB
566.Pq Vt str
567Set to either
568.Li c_r
569or
570.Li thread_xu
571to configure the system's default threading library.
572The default is
573.Li thread_xu .
3e84a8c5 574.It Va WANT_IDEA
cecff5c1
MD
575.Pq Vt bool
576Set to build the IDEA encryption code.
577This code is patented in the USA and many European countries.
578It is
579.Em "YOUR RESPONSIBILITY"
580to determine if you can legally use IDEA.
7ebbae99
SW
581.It Va WANT_INSTALLER
582.Pq Vt bool
583Set to build the installer.
9e603efc
SW
584.It Va WANT_NETGRAPH7
585.Pq Vt bool
586Set to build a newer, experimental
587.Xr netgraph 4
588userland.
589It has to be accompanied by
590.Dv NETGRAPH7*
591options in the kernel.
d884d710
SW
592.It Va WANT_USB4BSD
593.Pq Vt bool
594Set to build a newer, experimental
595.Xr usb 4
596userland.
984263bc
MD
597.El
598.Pp
599The following list provides a name and short description for variables
600that are used when building documentation.
601.Bl -tag -width Ar
984263bc
MD
602.It Va DOC_LANG
603.Pq Vt str
604The list of languages and encodings to build and install.
605.It Va PRINTERDEVICE
606.Pq Vt str
607The default format for system documentation, depends on your
608printer.
609This can be set to
610.Dq Li ascii
611for simple printers or
612.Dq Li ps
613for postscript or graphics printers with a ghostscript
614filter.
42a03791
SW
615.It Va GROFF_PAPER_SIZE
616.Pq Vt str
617The default paper size for
618.Xr groff 1
619(either
620.Dq letter
621or
622.Dq A4 ) .
984263bc 623.El
984263bc
MD
624.Sh FILES
625.Bl -tag -width /etc/defaults/make.conf -compact
626.It Pa /etc/defaults/make.conf
627.It Pa /etc/make.conf
984263bc
MD
628.It Pa /usr/src/Makefile
629.It Pa /usr/src/Makefile.inc1
984263bc
MD
630.El
631.Sh SEE ALSO
632.Xr gcc 1 ,
633.Xr install 1 ,
634.Xr make 1 ,
984263bc
MD
635.Xr lpd 8 ,
636.Xr sendmail 8
637.Sh HISTORY
638The
639.Nm
640file appeared sometime before
641.Fx 4.0 .
642.Sh AUTHORS
cecff5c1 643This manual page was written by
984263bc 644.An Mike W. Meyer Aq mwm@mired.org .