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$ 26.\" 27.Dd September 5, 2006 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 system-wide settings that will apply to every build using 37.Xr make 1 38and the standard 39.Pa sys.mk 40file. 41This is achieved as follows: 42.Xr make 1 43processes the system makefile 44.Pa sys.mk 45before any other file by default, and 46.Pa sys.mk 47includes 48.Nm . 49.Pp 50The file 51.Nm 52uses the standard makefile syntax. 53However, 54.Nm 55should not specify any dependencies to 56.Xr make 1 . 57Instead, 58.Nm 59is to set 60.Xr make 1 61variables that control the actions of other makefiles. 62.Pp 63The default location of 64.Nm 65is 66.Pa /etc/make.conf , 67though an alternative location can be specified in the 68.Xr make 1 69variable 70.Va __MAKE_CONF . 71You may need to override the location of 72.Nm 73if the system-wide settings are not suitable for a particular build. 74For instance, setting 75.Va __MAKE_CONF 76to 77.Pa /dev/null 78effectively resets all build controls to their defaults. 79.Pp 80The primary purpose of 81.Nm 82is to control the compilation of the 83.Fx 84sources, documentation, and ported applications, 85which are usually found in 86.Pa /usr/src , 87.Pa /usr/doc , 88and 89.Pa /usr/ports . 90As a rule, the system administrator creates 91.Nm 92when the values of certain control variables need to be changed 93from their defaults. 94.Pp 95The system build procedures occur in four broad areas: 96the world, the kernel, documentation and ports. 97Variables set in 98.Nm 99may be applicable in one, two, or all four of these areas. 100In addition, control variables can be specified 101for a particular build via the 102.Fl D 103option of 104.Xr make 1 105or in 106.Xr environ 7 . 107.Pp 108The following lists provide a name and short description for each 109variable you can use during the indicated builds. 110The values of 111variables flagged as 112.Vt bool 113are ignored; the variable being 114set at all (even to 115.Dq Li FALSE 116or 117.Dq Li NO ) 118causes it to 119be treated as if it were set. 120.Pp 121The following list provides a name and short description for variables 122that are used for all builds, or are used by the 123.Pa makefiles 124for things other than builds. 125.Bl -tag -width Ar 126.It Va ALWAYS_CHECK_MAKE 127.Pq Vt bool 128Instructs the top-level makefile in the source tree (normally 129.Pa /usr/src ) 130to always check if 131.Xr make 1 132is up-to-date. 133Normally this is only done for the world and buildworld targets to handle 134upgrades from older versions of 135.Fx . 136.It Va CFLAGS 137.Pq Vt str 138Controls the compiler setting when compiling C code. 139Optimization levels other than 140.Fl O 141and 142.Fl O2 143are not supported. 144.Va BDECFLAGS 145is provided as a set of 146.Xr gcc 1 147settings suggested by 148.An "Bruce Evans" Aq bde@FreeBSD.org 149for developing and testing changes. 150They can be used, if set, by: 151.Pp 152.Bd -literal -offset indent 153CFLAGS+=${BDECFLAGS} 154.Ed 155.It Va CPUTYPE 156.Pq Vt str 157Controls which processor should be targeted for generated 158code. 159This controls processor-specific optimizations in 160certain code (currently only OpenSSL) as well as modifying 161the value of 162.Va CFLAGS 163and 164.Va COPTFLAGS 165to contain the appropriate optimization directive to 166.Xr gcc 1 . 167The automatic setting of 168.Va CFLAGS 169and 170.Va COPTFLAGS 171may be overridden using the 172.Va NO_CPU_CFLAGS 173and 174.Va NO_CPU_COPTFLAGS 175variables, respectively. 176Refer to 177.Pa /usr/share/examples/etc/make.conf 178for a list of recognized 179.Va CPUTYPE 180options. 181.It Va CVS_UPDATE 182.Pq Vt bool 183Set this to use 184.Xr cvs 1 185to update your ports with 186.Dq Li "make update" . 187.It Va CXXFLAGS 188.Pq Vt str 189Controls the compiler settings when compiling C++ code. 190.Va CXXFLAGS 191is initially set to the value of 192.Va CFLAGS . 193If you want to 194add to the 195.Va CXXFLAGS 196value, use 197.Dq Li += 198instead of 199.Dq Li = . 200.It Va DOCSUPFILE 201.Pq Vt str 202The documentation 203.Ar supfile 204to use when doing a 205.Dq Li "make update" . 206This defaults to 207.Pa /usr/share/examples/cvsup/doc\-supfile . 208.It Va INSTALL 209.Pq Vt str 210the default install command. 211To install only files for which the target differs or does not exist, use 212.Bd -literal -offset indent 213INSTALL="install -C" 214.Ed 215Note that some makefiles (including those in 216.Pa /usr/share/mk ) 217may hardcode options for the supplied install command. 218.It Va LOCAL_DIRS 219.Pq Vt str 220List any directories that should be entered when doing 221make's in 222.Pa /usr/src 223in this variable. 224.It Va MAKE_SHELL 225.Pq Vt str 226Controls the shell used internally by 227.Xr make 1 228to process the command scripts in makefiles. 229.Xr sh 1 , 230.Xr ksh 1 , 231and 232.Xr csh 1 233all currently supported. 234.Pp 235.Dl "MAKE_SHELL?=sh" 236.It Va MTREE_FOLLOWS_SYMLINKS 237.Pq Vt str 238Set this to 239.Dq Fl L 240to cause 241.Xr mtree 8 242to follow symlinks. 243.It Va NO_CPU_CFLAGS 244.Pq Vt str 245Setting this variable will prevent CPU specific compiler flags 246from being automatically added to 247.Va CFLAGS 248during compile time. 249.It Va NO_CPU_COPTFLAGS 250.Pq Vt str 251Setting this variable will prevent CPU specific compiler flags 252from being automatically added to 253.Va COPTFLAGS 254during compile time. 255.It Va NO_DOCUPDATE 256.Pq Vt bool 257Set this to not update the doc tree during 258.Dq Li "make update" . 259.It Va NO_PORTSUPDATE 260.Pq Vt bool 261Set this to not update the ports tree during 262.Dq Li "make update" . 263.It Va PORTSSUPFILE 264.Pq Vt str 265The ports 266.Ar supfile 267to use when doing a 268.Dq Li "make update" . 269This defaults to 270.Pa /usr/share/examples/cvsup/ports\-supfile . 271.It Va SUP 272.Pq Vt str 273The location of the 274.Xr csup 1 275or 276.Xr cvsup 1 277command for 278.Dq Li "make update" . 279.It Va SUPFILE 280.Pq Vt str 281The first 282.Ar supfile 283to use when doing a 284.Dq Li "make update" . 285This defaults to 286.Pa /usr/share/examples/cvsup/standard\-supfile . 287.It Va SUPFILE1 288.Pq Vt str 289The second 290.Ar supfile 291to use when doing a 292.Dq Li "make update" . 293This defaults to 294.Pa /usr/share/examples/cvsup/secure\-supfile . 295.It Va SUPFILE2 296.Pq Vt str 297The third 298.Ar supfile 299to use when doing a 300.Dq Li "make update" . 301This defaults to 302.Pa /usr/share/examples/cvsup/secure\-supfile . 303.It Va SUPFLAGS 304.Pq Vt str 305The flag for the 306.Xr sup 1 307command when doing 308.Dq Li "make update" . 309This defaults to 310.Op Fl g L Ar 2 . 311.It Va SUPHOST 312.Pq Vt str 313The hostname of the sup server to use when doing 314.Dq Li "make update" . 315.It Va SUP_UPDATE 316.Pq Vt bool 317Set this to use 318.Xr cvsup 1 319to update your ports with 320.Dq Li "make update" . 321.El 322.Ss "BUILDING THE KERNEL" 323The following list provides a name and short description for variables 324that are only used doing a kernel build: 325.Bl -tag -width Ar 326.It Va BOOTWAIT 327.Pq Vt int 328Controls the amount of time the kernel waits for a console keypress 329before booting the default kernel. 330The value is approximately milliseconds. 331Keypresses are accepted by the BIOS before booting from disk, 332making it possible to give custom boot parameters even when this is 333set to 0. 334.It Va COPTFLAGS 335.Pq Vt str 336Controls the compiler settings when building the 337kernel. 338Optimization levels above 339.Oo Fl O ( O2 , No ...\& ) Oc 340are not guaranteed to work. 341.It Va KERNCONF 342.Pq Vt str 343Controls which kernel configurations will be 344built by 345.Dq Li "${MAKE} buildkernel" 346and installed by 347.Dq Li "${MAKE} installkernel" . 348For example, 349.Bd -literal -offset indent 350KERNCONF=MINE DEBUG GENERIC OTHERMACHINE 351.Ed 352.Pp 353will build the kernels specified by the config files 354.Pa MINE , DEBUG , GENERIC , 355and 356.Pa OTHERMACHINE , 357and install the kernel specified by the config file 358.Pa MINE . 359It defaults to 360.Pa GENERIC . 361.It Va MODULES_OVERRIDE 362.Pq Vt str 363Set to a list of modules to build instead of all of them. 364.It Va NO_KERNELCONFIG 365.Pq Vt bool 366Set this to skip running 367.Xr config 8 368during 369.Dq Li "${MAKE} buildkernel" . 370.It Va NO_KERNELDEPEND 371.Pq Vt bool 372Set this to skip running 373.Dq Li "${MAKE} depend" 374during 375.Dq Li "${MAKE} buildkernel" . 376.It Va NO_MODULES 377.Pq Vt bool 378Set to not build modules with the kernel. 379.It Va PORTS_MODULES 380Set this to the list of ports you wish to rebuild every time the kernel 381is built. 382.It Va WITHOUT_MODULES 383.Pq Vt str 384Set to a list of modules to exclude from the build. 385This provides a 386somewhat easier way to exclude modules you are certain you will never 387need than specifying 388.Va MODULES_OVERRIDE . 389This is applied 390.Em after 391.Va MODULES_OVERRIDE . 392.El 393.Ss "BUILDING THE WORLD" 394The following list provides a name and short description for variables 395that are used during the world build: 396.Bl -tag -width Ar 397.It Va BOOT_COMCONSOLE_PORT 398.Pq Vt str 399The port address to use for the console if the boot blocks have 400been configured to use a serial console instead of the keyboard/video card. 401.It Va BOOT_COMCONSOLE_SPEED 402.Pq Vt int 403The baud rate to use for the console if the boot blocks have 404been configured to use a serial console instead of the keyboard/video card. 405.It Va BOOT_PXELDR_ALWAYS_SERIAL 406.Pq Vt bool 407Compile in the code into 408.Xr pxeboot 8 409that forces the use of a serial console. 410This is analogous to the 411.Fl h 412option in 413.Xr boot 8 414blocks. 415.It Va BOOT_PXELDR_PROBE_KEYBOARD 416.Pq Vt bool 417Compile in the code into 418.Xr pxeboot 8 419that probes the keyboard. 420If no keyboard is found, boot with the dual console configuration. 421This is analogous to the 422.Fl D 423option in 424.Xr boot 8 425blocks. 426.It Va ENABLE_SUID_K5SU 427.Pq Vt bool 428Set this if you wish to use the ksu utility. 429Otherwise, it will be 430installed without the set-user-ID bit set. 431.It Va ENABLE_SUID_NEWGRP 432.Pq Vt bool 433Set this to install 434.Xr newgrp 1 435with the set-user-ID bit set. 436Otherwise, 437.Xr newgrp 1 438will not be able to change users' groups. 439.It Va ENABLE_SUID_SSH 440.Pq Vt bool 441Set this to install 442.Xr ssh 1 443with the set-user-ID bit turned on. 444.It Va LOADER_TFTP_SUPPORT 445.Pq Vt bool 446By default the 447.Xr pxeboot 8 448loader retrieves the kernel via NFS. 449Defining this and recompiling 450.Pa /usr/src/sys/boot 451will cause it to retrieve the kernel via TFTP. 452This allows 453.Xr pxeboot 8 454to load a custom BOOTP diskless kernel yet 455still mount the server's 456.Pa / 457rather than load the server's kernel. 458.It Va LOADER_FIREWIRE_SUPPORT 459.Pq Vt bool 460Defining this and recompiling 461.Pa /usr/src/sys/boot/i386 462will add 463.Xr dcons 4 464console driver to 465.Xr loader 8 466and allow access over FireWire(IEEE1394) using 467.Xr dconschat 8 . 468Currently, only i386 and amd64 are supported. 469.It Va MODULES_WITH_WORLD 470.Pq Vt bool 471Set to build modules with the system instead of the kernel. 472.It Va NO_CLEAN 473.Pq Vt bool 474Set this to disable cleaning during 475.Dq Li "make buildworld" . 476This should not be set unless you know what you are doing. 477.It Va NO_CLEANDIR 478.Pq Vt bool 479Set this to run 480.Dq Li "${MAKE} clean" 481instead of 482.Dq Li "${MAKE} cleandir" . 483.It Va NO_MANCOMPRESS 484.Pq Vt bool 485Set to install manual pages uncompressed. 486.It Va NO_SHARE 487.Pq Vt bool 488Set to not build in the 489.Pa share 490subdir. 491.It Va NO_SHARED 492.Pq Vt bool 493Set to build 494.Pa /bin 495and 496.Pa /sbin 497statically linked, this can be bad. 498If set, every utility that uses 499.Pa bsd.prog.mk 500will be linked statically. 501.It Va PPP_NO_NAT 502.Pq Vt bool 503Build 504.Xr ppp 8 505without support for network address translation (NAT). 506.It Va PPP_NO_NETGRAPH 507.Pq Vt bool 508Set to build 509.Xr ppp 8 510without support for Netgraph. 511.It Va PPP_NO_RADIUS 512.Pq Vt bool 513Set to build 514.Xr ppp 8 515without support for RADIUS. 516.It Va PPP_NO_SUID 517.Pq Vt bool 518Set to disable the installation of 519.Xr ppp 8 520as a set-user-ID root program. 521.It Va SENDMAIL_ADDITIONAL_MC 522.Pq Vt str 523Additional 524.Pa .mc 525files which should be built into 526.Pa .cf 527files at build time. 528The value should include the full path to the 529.Pa .mc 530file(s), e.g., 531.Pa /etc/mail/foo.mc 532.Pa /etc/mail/bar.mc . 533.It Va SENDMAIL_ALIASES 534.Pq Vt str 535List of 536.Xr aliases 5 537files to rebuild when using 538.Pa /etc/mail/Makefile . 539The default value is 540.Pa /etc/mail/aliases . 541.It Va SENDMAIL_CFLAGS 542.Pq Vt str 543Flags to pass to the compile command when building 544.Xr sendmail 8 . 545The 546.Va SENDMAIL_* 547flags can be used to provide SASL support with setting such as: 548.Bd -literal -offset indent 549SENDMAIL_CFLAGS=-I/usr/local/include -DSASL 550SENDMAIL_LDFLAGS=-L/usr/local/lib 551SENDMAIL_LDADD=-lsasl 552.Ed 553.It Va SENDMAIL_CF_DIR 554.Pq Vt str 555Override the default location for the 556.Xr m4 1 557configuration files used to build a 558.Pa .cf 559file from a 560.Pa .mc 561file. 562.It Va SENDMAIL_DPADD 563.Pq Vt str 564Extra dependencies to add when building 565.Xr sendmail 8 . 566.It Va SENDMAIL_LDADD 567.Pq Vt str 568Flags to add to the end of the 569.Xr ld 1 570command when building 571.Xr sendmail 8 . 572.It Va SENDMAIL_LDFLAGS 573.Pq Vt str 574Flags to pass to the 575.Xr ld 1 576command when building 577.Xr sendmail 8 . 578.It Va SENDMAIL_M4_FLAGS 579.Pq Vt str 580Flags passed to 581.Xr m4 1 582when building a 583.Pa .cf 584file from a 585.Pa .mc 586file. 587.It Va SENDMAIL_MAP_PERMS 588.Pq Vt str 589Mode to use when generating alias and map database files using 590.Pa /etc/mail/Makefile . 591The default value is 0640. 592.It Va SENDMAIL_MAP_SRC 593.Pq Vt str 594Additional maps to rebuild when using 595.Pa /etc/mail/Makefile . 596The 597.Pa access , 598.Pa bitdomain , 599.Pa domaintable , 600.Pa genericstable , 601.Pa mailertable , 602.Pa uucpdomain , 603and 604.Pa virtusertable 605maps are always rebuilt if they exist. 606.It Va SENDMAIL_MAP_TYPE 607.Pq Vt str 608Database map type to use when generating map database files using 609.Pa /etc/mail/Makefile . 610The default value is hash. 611The alternative is btree. 612.It Va SENDMAIL_MC 613.Pq Vt str 614The default 615.Xr m4 1 616configuration file to use at install time. 617The value should include the full path to the 618.Pa .mc 619file, e.g., 620.Pa /etc/mail/myconfig.mc . 621Use with caution as a make install will overwrite any existing 622.Pa /etc/mail/sendmail.cf . 623Note that 624.Va SENDMAIL_CF 625is now deprecated. 626.It Va SENDMAIL_SET_USER_ID 627.Pq Vt bool 628If set, install 629.Xr sendmail 8 630as a set-user-ID root binary instead of a set-group-ID binary 631and do not install 632.Pa /etc/mail/submit.{cf,mc} . 633Use of this flag is not recommended and the alternative advice in 634.Pa /etc/mail/README 635should be followed instead if at all possible. 636.It Va SENDMAIL_START_SCRIPT 637.Pq Vt str 638The script used by 639.Pa /etc/mail/Makefile 640to start, stop, and restart 641.Xr sendmail 8 . 642The default value is 643.Pa /etc/rc.sendmail . 644This value should match the 645.Dq Li mta_start_script 646setting in 647.Xr rc.conf 5 . 648.It Va SENDMAIL_SUBMIT_MC 649.Pq Vt str 650The default 651.Xr m4 1 652configuration file for mail submission 653to use at install time. 654The value should include the full path to the 655.Pa .mc 656file, e.g., 657.Pa /etc/mail/mysubmit.mc . 658Use with caution as a make install will overwrite any existing 659.Pa /etc/mail/submit.cf . 660.It Va TOP_TABLE_SIZE 661.Pq Vt int 662.Xr top 1 663uses a hash table for the user names. 664The size of this hash can be tuned to match the number of local users. 665The table size should be a prime number 666approximately twice as large as the number of lines in 667.Pa /etc/passwd . 668The default number is 20011. 669.It Va WANT_FORCE_OPTIMIZATION_DOWNGRADE 670.Pq Vt int 671Causes the system compiler to be built such that it forces high optimization 672levels to a lower one. 673.Xr gcc 1 674.Fl O2 675and above is known to trigger known optimizer bugs at various 676times. 677The value assigned is the highest optimization value used. 678.El 679.Ss "BUILDING DOCUMENTATION" 680The following list provides a name and short description for variables 681that are used when building documentation. 682.Bl -tag -width ".Va PRINTERDEVICE" 683.It Va DISTDIR 684.Pq Vt str 685Where distfiles are kept. 686Normally, this is 687.Pa distfiles 688in 689.Va PORTSDIR . 690.It Va DOC_LANG 691.Pq Vt str 692The list of languages and encodings to build and install. 693.It Va PRINTERDEVICE 694.Pq Vt str 695The default format for system documentation, depends on your 696printer. 697This can be set to 698.Dq Li ascii 699for simple printers, or 700.Dq Li ps 701for postscript or graphics printers with a ghostscript 702filter, or both. 703.El 704.Sh FILES 705.Bl -tag -width ".Pa /usr/share/examples/etc/make.conf" -compact 706.It Pa /etc/make.conf 707.It Pa /usr/doc/Makefile 708.It Pa /usr/share/examples/etc/make.conf 709.It Pa /usr/share/mk/sys.mk 710.It Pa /usr/src/Makefile 711.It Pa /usr/src/Makefile.inc1 712.El 713.Sh SEE ALSO 714.Xr gcc 1 , 715.Xr install 1 , 716.Xr make 1 , 717.Xr src.conf 5 , 718.Xr environ 7 , 719.Xr ports 7 , 720.Xr sendmail 8 721.Sh HISTORY 722The 723.Nm 724file appeared sometime before 725.Fx 4.0 . 726.Sh AUTHORS 727This 728manual page was written by 729.An Mike W. Meyer Aq mwm@mired.org . 730.Sh BUGS 731This manual page may occasionally be out of date with respect to 732the options currently available for use in 733.Nm . 734Please check the 735.Pa /usr/share/examples/etc/make.conf 736file for the latest options which are available. 737.Sh CAVEATS 738Note, that 739.Ev MAKEOBJDIRPREFIX 740and 741.Ev MAKEOBJDIR 742are environment variables and should not be set in 743.Nm 744but in make's environment. 745