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 March 21, 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" 323.Pp 324The following list provides a name and short description for variables 325that are only used doing a kernel build: 326.Bl -tag -width Ar 327.It Va BOOTWAIT 328.Pq Vt int 329Controls the amount of time the kernel waits for a console keypress 330before booting the default kernel. 331The value is approximately milliseconds. 332Keypresses are accepted by the BIOS before booting from disk, 333making it possible to give custom boot parameters even when this is 334set to 0. 335.It Va BOOT_COMCONSOLE_PORT 336.Pq Vt str 337The port address to use for the console if the boot blocks have 338been configured to use a serial console instead of the keyboard/video card. 339.It Va BOOT_COMCONSOLE_SPEED 340.Pq Vt int 341The baud rate to use for the console if the boot blocks have 342been configured to use a serial console instead of the keyboard/video card. 343.It Va COPTFLAGS 344.Pq Vt str 345Controls the compiler settings when building the 346kernel. 347Optimization levels above 348.Oo Fl O ( O2 , No ...\& ) Oc 349are not guaranteed to work. 350.It Va KERNCONF 351.Pq Vt str 352Controls which kernel configurations will be 353built by 354.Dq Li "${MAKE} buildkernel" 355and installed by 356.Dq Li "${MAKE} installkernel" . 357For example, 358.Bd -literal -offset indent 359KERNCONF=MINE DEBUG GENERIC OTHERMACHINE 360.Ed 361.Pp 362will build the kernels specified by the config files 363.Pa MINE , DEBUG , GENERIC , 364and 365.Pa OTHERMACHINE , 366and install the kernel specified by the config file 367.Pa MINE . 368It defaults to 369.Pa GENERIC . 370.It Va LOADER_TFTP_SUPPORT 371.Pq Vt bool 372While not a buildkernel-affected option, there is no better place for this. 373By default the 374.Xr pxeboot 8 375loader retrieves the kernel via NFS. 376Defining this and recompiling 377.Pa /usr/src/sys/boot 378will cause it to retrieve the kernel via TFTP. 379This allows 380.Xr pxeboot 8 381to load a custom BOOTP diskless kernel yet 382still mount the server's 383.Pa / 384rather than load the server's kernel. 385.It Va MODULES_OVERRIDE 386.Pq Vt str 387Set to a list of modules to build instead of all of them. 388.It Va NO_KERNELCONFIG 389.Pq Vt bool 390Set this to skip running 391.Xr config 8 392during 393.Dq Li "${MAKE} buildkernel" . 394.It Va NO_KERNELDEPEND 395.Pq Vt bool 396Set this to skip running 397.Dq Li "${MAKE} depend" 398during 399.Dq Li "${MAKE} buildkernel" . 400.It Va NO_MODULES 401.Pq Vt bool 402Set to not build modules with the kernel. 403.It Va PORTS_MODULES 404Set this to the list of ports you wish to rebuild every time the kernel 405is built. 406.It Va WITHOUT_MODULES 407.Pq Vt str 408Set to a list of modules to exclude from the build. 409This provides a 410somewhat easier way to exclude modules you are certain you will never 411need than specifying 412.Va MODULES_OVERRIDE . 413This is applied 414.Em after 415.Va MODULES_OVERRIDE . 416.El 417.Ss "BUILDING THE WORLD" 418.Pp 419The following list provides a name and short description for variables 420that are used during the world build: 421.Bl -tag -width Ar 422.It Va ENABLE_SUID_K5SU 423.Pq Vt bool 424Set this if you wish to use the ksu utility. 425Otherwise, it will be 426installed without the set-user-ID bit set. 427.It Va ENABLE_SUID_NEWGRP 428.Pq Vt bool 429Set this to install 430.Xr newgrp 1 431with the set-user-ID bit set. 432Otherwise, 433.Xr newgrp 1 434will not be able to change users' groups. 435.It Va ENABLE_SUID_SSH 436.Pq Vt bool 437Set this to install 438.Xr ssh 1 439with the set-user-ID bit turned on. 440.It Va MODULES_WITH_WORLD 441.Pq Vt bool 442Set to build modules with the system instead of the kernel. 443.It Va NO_CLEAN 444.Pq Vt bool 445Set this to disable cleaning during 446.Dq Li "make buildworld" . 447This should not be set unless you know what you are doing. 448.It Va NO_CLEANDIR 449.Pq Vt bool 450Set this to run 451.Dq Li "${MAKE} clean" 452instead of 453.Dq Li "${MAKE} cleandir" . 454.It Va NO_MANCOMPRESS 455.Pq Vt bool 456Set to install manual pages uncompressed. 457.It Va NO_SHARE 458.Pq Vt bool 459Set to not build in the 460.Pa share 461subdir. 462.It Va NO_SHARED 463.Pq Vt bool 464Set to build 465.Pa /bin 466and 467.Pa /sbin 468statically linked, this can be bad. 469If set, every utility that uses 470.Pa bsd.prog.mk 471will be linked statically. 472.It Va PPP_NO_NAT 473.Pq Vt bool 474Build 475.Xr ppp 8 476without support for network address translation (NAT). 477.It Va PPP_NO_NETGRAPH 478.Pq Vt bool 479Set to build 480.Xr ppp 8 481without support for Netgraph. 482.It Va PPP_NO_RADIUS 483.Pq Vt bool 484Set to build 485.Xr ppp 8 486without support for RADIUS. 487.It Va PPP_NO_SUID 488.Pq Vt bool 489Set to disable the installation of 490.Xr ppp 8 491as a set-user-ID root program. 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 . 504.It Va SENDMAIL_CFLAGS 505.Pq Vt str 506Flags to pass to the compile command when building 507.Xr sendmail 8 . 508The 509.Va SENDMAIL_* 510flags can be used to provide SASL support with setting such as: 511.Bd -literal -offset indent 512SENDMAIL_CFLAGS=-I/usr/local/include -DSASL 513SENDMAIL_LDFLAGS=-L/usr/local/lib 514SENDMAIL_LDADD=-lsasl 515.Ed 516.It Va SENDMAIL_CF_DIR 517.Pq Vt str 518Override the default location for the 519.Xr m4 1 520configuration files used to build a 521.Pa .cf 522file from a 523.Pa .mc 524file. 525.It Va SENDMAIL_DPADD 526.Pq Vt str 527Extra dependencies to add when building 528.Xr sendmail 8 . 529.It Va SENDMAIL_LDADD 530.Pq Vt str 531Flags to add to the end of the 532.Xr ld 1 533command when building 534.Xr sendmail 8 . 535.It Va SENDMAIL_LDFLAGS 536.Pq Vt str 537Flags to pass to the 538.Xr ld 1 539command when building 540.Xr sendmail 8 . 541.It Va SENDMAIL_M4_FLAGS 542.Pq Vt str 543Flags passed to 544.Xr m4 1 545when building a 546.Pa .cf 547file from a 548.Pa .mc 549file. 550.It Va SENDMAIL_MAP_PERMS 551.Pq Vt str 552Mode to use when generating alias and map database files using 553.Pa /etc/mail/Makefile . 554The default value is 0640. 555.It Va SENDMAIL_MC 556.Pq Vt str 557The default 558.Xr m4 1 559configuration file to use at install time. 560The value should include the full path to the 561.Pa .mc 562file, e.g., 563.Pa /etc/mail/myconfig.mc . 564Use with caution as a make install will overwrite any existing 565.Pa /etc/mail/sendmail.cf . 566Note that 567.Va SENDMAIL_CF 568is now deprecated. 569.It Va SENDMAIL_SET_USER_ID 570.Pq Vt bool 571If set, install 572.Xr sendmail 8 573as a set-user-ID root binary instead of a set-group-ID binary 574and do not install 575.Pa /etc/mail/submit.{cf,mc} . 576Use of this flag is not recommended and the alternative advice in 577.Pa /etc/mail/README 578should be followed instead if at all possible. 579.It Va SENDMAIL_SUBMIT_MC 580.Pq Vt str 581The default 582.Xr m4 1 583configuration file for mail submission 584to use at install time. 585The value should include the full path to the 586.Pa .mc 587file, e.g., 588.Pa /etc/mail/mysubmit.mc . 589Use with caution as a make install will overwrite any existing 590.Pa /etc/mail/submit.cf . 591.It Va TOP_TABLE_SIZE 592.Pq Vt int 593.Xr top 1 594uses a hash table for the user names. 595The size of this hash can be tuned to match the number of local users. 596The table size should be a prime number 597approximately twice as large as the number of lines in 598.Pa /etc/passwd . 599The default number is 20011. 600.It Va WANT_FORCE_OPTIMIZATION_DOWNGRADE 601.Pq Vt int 602Causes the system compiler to be built such that it forces high optimization 603levels to a lower one. 604.Xr gcc 1 605.Fl O2 606and above is known to trigger known optimizer bugs at various 607times. 608The value assigned is the highest optimization value used. 609.El 610.Ss "BUILDING DOCUMENTATION" 611.Pp 612The following list provides a name and short description for variables 613that are used when building documentation. 614.Bl -tag -width ".Va PRINTERDEVICE" 615.It Va DISTDIR 616.Pq Vt str 617Where distfiles are kept. 618Normally, this is 619.Pa distfiles 620in 621.Va PORTSDIR . 622.It Va DOC_LANG 623.Pq Vt str 624The list of languages and encodings to build and install. 625.It Va PRINTERDEVICE 626.Pq Vt str 627The default format for system documentation, depends on your 628printer. 629This can be set to 630.Dq Li ascii 631for simple printers, or 632.Dq Li ps 633for postscript or graphics printers with a ghostscript 634filter, or both. 635.El 636.Sh FILES 637.Bl -tag -width ".Pa /usr/share/examples/etc/make.conf" -compact 638.It Pa /etc/make.conf 639.It Pa /usr/doc/Makefile 640.It Pa /usr/share/examples/etc/make.conf 641.It Pa /usr/share/mk/sys.mk 642.It Pa /usr/src/Makefile 643.It Pa /usr/src/Makefile.inc1 644.El 645.Sh SEE ALSO 646.Xr gcc 1 , 647.Xr install 1 , 648.Xr make 1 , 649.Xr src.conf 5 , 650.Xr environ 7 , 651.Xr ports 7 , 652.Xr sendmail 8 653.Sh HISTORY 654The 655.Nm 656file appeared sometime before 657.Fx 4.0 . 658.Sh AUTHORS 659This 660manual page was written by 661.An Mike W. Meyer Aq mwm@mired.org . 662.Sh BUGS 663This manual page may occasionally be out of date with respect to 664the options currently available for use in 665.Nm . 666Please check the 667.Pa /usr/share/examples/etc/make.conf 668file for the latest options which are available. 669.Sh CAVEATS 670Note, that 671.Ev MAKEOBJDIRPREFIX 672and 673.Ev MAKEOBJDIR 674are environment variables and should not be set in 675.Nm 676but in make's environment. 677