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