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 MODULES_WITH_WORLD 459.Pq Vt bool 460Set to build modules with the system instead of the kernel. 461.It Va NO_CLEAN 462.Pq Vt bool 463Set this to disable cleaning during 464.Dq Li "make buildworld" . 465This should not be set unless you know what you are doing. 466.It Va NO_CLEANDIR 467.Pq Vt bool 468Set this to run 469.Dq Li "${MAKE} clean" 470instead of 471.Dq Li "${MAKE} cleandir" . 472.It Va NO_MANCOMPRESS 473.Pq Vt bool 474Set to install manual pages uncompressed. 475.It Va NO_SHARE 476.Pq Vt bool 477Set to not build in the 478.Pa share 479subdir. 480.It Va NO_SHARED 481.Pq Vt bool 482Set to build 483.Pa /bin 484and 485.Pa /sbin 486statically linked, this can be bad. 487If set, every utility that uses 488.Pa bsd.prog.mk 489will be linked statically. 490.It Va PPP_NO_NAT 491.Pq Vt bool 492Build 493.Xr ppp 8 494without support for network address translation (NAT). 495.It Va PPP_NO_NETGRAPH 496.Pq Vt bool 497Set to build 498.Xr ppp 8 499without support for Netgraph. 500.It Va PPP_NO_RADIUS 501.Pq Vt bool 502Set to build 503.Xr ppp 8 504without support for RADIUS. 505.It Va PPP_NO_SUID 506.Pq Vt bool 507Set to disable the installation of 508.Xr ppp 8 509as a set-user-ID root program. 510.It Va SENDMAIL_ADDITIONAL_MC 511.Pq Vt str 512Additional 513.Pa .mc 514files which should be built into 515.Pa .cf 516files at build time. 517The value should include the full path to the 518.Pa .mc 519file(s), e.g., 520.Pa /etc/mail/foo.mc 521.Pa /etc/mail/bar.mc . 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_CF_DIR 535.Pq Vt str 536Override the default location for the 537.Xr m4 1 538configuration files used to build a 539.Pa .cf 540file from a 541.Pa .mc 542file. 543.It Va SENDMAIL_DPADD 544.Pq Vt str 545Extra dependencies to add when building 546.Xr sendmail 8 . 547.It Va SENDMAIL_LDADD 548.Pq Vt str 549Flags to add to the end of the 550.Xr ld 1 551command when building 552.Xr sendmail 8 . 553.It Va SENDMAIL_LDFLAGS 554.Pq Vt str 555Flags to pass to the 556.Xr ld 1 557command when building 558.Xr sendmail 8 . 559.It Va SENDMAIL_M4_FLAGS 560.Pq Vt str 561Flags passed to 562.Xr m4 1 563when building a 564.Pa .cf 565file from a 566.Pa .mc 567file. 568.It Va SENDMAIL_MAP_PERMS 569.Pq Vt str 570Mode to use when generating alias and map database files using 571.Pa /etc/mail/Makefile . 572The default value is 0640. 573.It Va SENDMAIL_MC 574.Pq Vt str 575The default 576.Xr m4 1 577configuration file to use at install time. 578The value should include the full path to the 579.Pa .mc 580file, e.g., 581.Pa /etc/mail/myconfig.mc . 582Use with caution as a make install will overwrite any existing 583.Pa /etc/mail/sendmail.cf . 584Note that 585.Va SENDMAIL_CF 586is now deprecated. 587.It Va SENDMAIL_SET_USER_ID 588.Pq Vt bool 589If set, install 590.Xr sendmail 8 591as a set-user-ID root binary instead of a set-group-ID binary 592and do not install 593.Pa /etc/mail/submit.{cf,mc} . 594Use of this flag is not recommended and the alternative advice in 595.Pa /etc/mail/README 596should be followed instead if at all possible. 597.It Va SENDMAIL_SUBMIT_MC 598.Pq Vt str 599The default 600.Xr m4 1 601configuration file for mail submission 602to use at install time. 603The value should include the full path to the 604.Pa .mc 605file, e.g., 606.Pa /etc/mail/mysubmit.mc . 607Use with caution as a make install will overwrite any existing 608.Pa /etc/mail/submit.cf . 609.It Va TOP_TABLE_SIZE 610.Pq Vt int 611.Xr top 1 612uses a hash table for the user names. 613The size of this hash can be tuned to match the number of local users. 614The table size should be a prime number 615approximately twice as large as the number of lines in 616.Pa /etc/passwd . 617The default number is 20011. 618.It Va WANT_FORCE_OPTIMIZATION_DOWNGRADE 619.Pq Vt int 620Causes the system compiler to be built such that it forces high optimization 621levels to a lower one. 622.Xr gcc 1 623.Fl O2 624and above is known to trigger known optimizer bugs at various 625times. 626The value assigned is the highest optimization value used. 627.El 628.Ss "BUILDING DOCUMENTATION" 629The following list provides a name and short description for variables 630that are used when building documentation. 631.Bl -tag -width ".Va PRINTERDEVICE" 632.It Va DISTDIR 633.Pq Vt str 634Where distfiles are kept. 635Normally, this is 636.Pa distfiles 637in 638.Va PORTSDIR . 639.It Va DOC_LANG 640.Pq Vt str 641The list of languages and encodings to build and install. 642.It Va PRINTERDEVICE 643.Pq Vt str 644The default format for system documentation, depends on your 645printer. 646This can be set to 647.Dq Li ascii 648for simple printers, or 649.Dq Li ps 650for postscript or graphics printers with a ghostscript 651filter, or both. 652.El 653.Sh FILES 654.Bl -tag -width ".Pa /usr/share/examples/etc/make.conf" -compact 655.It Pa /etc/make.conf 656.It Pa /usr/doc/Makefile 657.It Pa /usr/share/examples/etc/make.conf 658.It Pa /usr/share/mk/sys.mk 659.It Pa /usr/src/Makefile 660.It Pa /usr/src/Makefile.inc1 661.El 662.Sh SEE ALSO 663.Xr gcc 1 , 664.Xr install 1 , 665.Xr make 1 , 666.Xr src.conf 5 , 667.Xr environ 7 , 668.Xr ports 7 , 669.Xr sendmail 8 670.Sh HISTORY 671The 672.Nm 673file appeared sometime before 674.Fx 4.0 . 675.Sh AUTHORS 676This 677manual page was written by 678.An Mike W. Meyer Aq mwm@mired.org . 679.Sh BUGS 680This manual page may occasionally be out of date with respect to 681the options currently available for use in 682.Nm . 683Please check the 684.Pa /usr/share/examples/etc/make.conf 685file for the latest options which are available. 686.Sh CAVEATS 687Note, that 688.Ev MAKEOBJDIRPREFIX 689and 690.Ev MAKEOBJDIR 691are environment variables and should not be set in 692.Nm 693but in make's environment. 694