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