1.\" $NetBSD: mk.conf.5,v 1.30 2005/12/22 02:52:40 hubertf Exp $ 2.\" 3.\" Copyright (c) 1999-2003 The NetBSD Foundation, Inc. 4.\" All rights reserved. 5.\" 6.\" This code is derived from software contributed to The NetBSD Foundation 7.\" by Luke Mewburn. 8.\" 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 3. All advertising materials mentioning features or use of this software 18.\" must display the following acknowledgement: 19.\" This product includes software developed by Luke Mewburn. 20.\" 4. The name of the author may not be used to endorse or promote products 21.\" derived from this software without specific prior written permission. 22.\" 23.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 24.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 25.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 26.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 27.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 28.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 29.\" OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 30.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 31.\" TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 32.\" USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33.\" 34.Dd April 21, 2005 35.Dt MK.CONF 5 36.Os 37.\" turn off hyphenation 38.hym 999 39. 40.Sh NAME 41.Nm mk.conf 42.Nd make configuration file 43. 44.Sh DESCRIPTION 45The 46.Nm 47file overrides various parameters used during the build of the system. 48.Pp 49Listed below are the 50.Nm 51variables that may be set, the values to which each may be set, 52a brief description of what each variable does, and a reference to 53relevant manual pages. 54. 55.Ss NetBSD System variables 56. 57.de YorN 58Can be set to 59.Dq yes 60or 61.Dq no . 62.. 63.de DFLT 64.Pp 65.Em Default : 66.. 67.de DFLTu 68.DFLT 69Unset. 70.. 71.de DFLTy 72.DFLT 73.Dq yes 74.. 75.de DFLTn 76.DFLT 77.Dq no 78.. 79.Bl -tag -width MKDYNAMICROOT 80. 81.It Sy NETBSDSRCDIR 82The path to the top level of the 83.Nx 84sources. 85If 86.Xr make 1 87is run from within the 88.Nx 89source tree, the default is the top 90level of that tree (as determined by the presence of 91.Pa build.sh 92and 93.Pa tools/ ) , 94otherwise 95.Sy BSDSRCDIR 96will be used. 97. 98.It Sy BSDOBJDIR 99The real path to the 100.Sq obj 101tree for the 102.Nx 103source tree. 104.DFLT 105.Pa /usr/obj 106. 107.It Sy BSDSRCDIR 108The real path to the 109.Nx 110source tree. 111.DFLT 112.Pa /usr/src 113. 114.It Sy BUILD 115If defined, 116.Sq "make install" 117checks that the targets in the source directories are up-to-date and 118re-makes them if they are out of date, instead of blindly trying to install 119out of date or non-existent targets. 120.DFLTu 121. 122.It Sy BUILDID 123Identifier for the build. 124The identifier will be appended to 125object directory names, and can be consulted in the 126.Xr make 1 127configuration file in order to set additional build parameters, 128such as compiler flags. 129.DFLTu 130. 131.It Sy COPTS 132Extra options for the C compiler. 133Should be appended to (e.g., 134.Sy COPTS+=-g ) , 135rather than explicitly set. 136. 137.It Sy DESTDIR 138Directory to contain the built 139.Nx 140system. 141If set, special options are passed to the compilation tools to 142prevent their default use of the host system's 143.Sy /usr/include , /usr/lib , 144and so forth. 145This pathname should 146.Em not 147end with a slash 148.Pq / 149character (for installation into the system's root directory, set 150.Sy DESTDIR 151to an empty string). 152The directory must reside on a file system which supports long file 153names and hard links. 154.DFLT 155Empty string if 156.Sy USETOOLS 157is 158.Dq yes ; 159unset otherwise. 160.Pp 161.Em Note : 162.Sy build.sh 163will provide a default of 164.Pa destdir. Ns Sy MACHINE 165(in the top-level 166.Sy .OBJDIR ) 167unless run in 168.Sq expert 169mode 170. 171.It Sy MKBFD 172.YorN 173Indicates whether 174.Sy libbfd , 175.Sy libiberty , 176or any of the things that depend 177upon them (such as the binutils, 178.Xr as 1 , 179.Xr gdb 1 , 180.Xr ld 1 , 181.Xr dbsym 8 , 182or 183.Xr mdsetimage 8 ) 184should be built. 185.DFLTy 186. 187.It Sy MKCATPAGES 188.YorN 189Indicates whether preformatted plaintext manual pages will be created 190during a build. 191.DFLTy 192. 193.It Sy MKCRYPTO 194.YorN 195Indicates whether cryptographic code will be included in a build; 196provided for the benefit of countries that do not allow strong 197cryptography. 198Will not affect use of the standard low-security password encryption system, 199.Xr crypt 3 . 200.DFLTy 201.Pp 202If 203.Dq no , 204acts as 205.Sy MKKERBEROS=no . 206. 207.It Sy MKCRYPTO_IDEA 208.YorN 209Indicates whether IDEA support will be built into 210.Sy libcrypto_idea.a . 211.DFLTn 212. 213.It Sy MKCRYPTO_MDC2 214.YorN 215Indicates whether MDC2 support will be built into 216.Sy libcrypto_mdc2.a . 217.DFLTn 218. 219.It Sy MKCRYPTO_RC5 220.YorN 221Indicates whether RC5 support will be built into 222.Sy libcrypto_rc5.a . 223.DFLTn 224. 225.It Sy MKCVS 226.YorN 227Indicates whether 228.Xr cvs 1 229is built. 230.DFLTy 231. 232.It Sy MKDOC 233.YorN 234Indicates whether system documentation destined for 235.Sy DESTDIR Ns Pa /usr/share/doc 236will be installed during a build. 237.DFLTy 238. 239.It Sy MKDYNAMICROOT 240.YorN 241Indicates whether all programs should be dynamically linked, 242and to install shared libraries required by 243.Pa /bin 244and 245.Pa /sbin 246and the shared linker 247.Xr ld.elf_so 1 248into 249.Pa /lib . 250If 251.Sq no , 252link programs in 253.Pa /bin 254and 255.Pa /sbin 256statically. 257.DFTLy 258. 259.It Sy MKGCC 260.YorN 261Indicates whether 262.Xr gcc 1 263or any related libraries 264.Pq Sy libg2c , libgcc , libobjc , libstdc+ 265are built. 266.DFLTy 267. 268.It Sy MKGDB 269.YorN 270Indicates whether 271.Xr gdb 1 272is built. 273.DFLTy 274. 275.It Sy MKHESIOD 276.YorN 277Indicates whether the Hesiod infrastructure 278(libraries and support programs) is built. 279.DFLTy 280. 281.It Sy MKHOSTOBJ 282.YorN 283If set to 284.Dq yes , 285then for programs intended to be run on the compile host, 286the name, release, and architecture of the host operating system 287will be suffixed to the name of the object directory created by 288.Dq make obj . 289(This allows multiple host systems to compile 290.Nx 291for a single target.) 292If set to 293.Dq no , 294then programs built to be run on the compile host will use the same 295object directory names as programs built to be run on the target. 296.DFLTn 297. 298.It Sy MKHTML 299.YorN 300Indicates whether the html manual pages are built and installed. 301.DFLTy 302. 303.It Sy MKIEEEFP 304.YorN 305Indicates whether code for IEEE754/IEC60559 conformance is built. 306Has no effect on most platforms. 307.DFLTy 308. 309.It Sy MKINFO 310.YorN 311Indicates whether GNU Info files, used for the documentation for 312most of the compilation tools, will be created and installed during a 313build. 314.DFLTy 315. 316.It Sy MKIPFILTER 317.YorN 318Indicates whether the 319.Xr ipf 4 320programs, headers and LKM will be compiled and installed during a build. 321.DFLTy 322. 323.It Sy MKKERBEROS4 324.YorN 325Indicates whether the Kerberos v4 infrastructure 326(libraries and support programs) is built. 327.DFLTy 328. 329.It Sy MKKERBEROS 330.YorN 331Indicates whether the Kerberos v5 infrastructure 332(libraries and support programs) is built. 333.DFLTy 334. 335.It Sy MKLINKLIB 336.YorN 337Indicates whether all of the shared library infrastructure is built. 338If 339.Sq no , 340prevents: 341installation of the 342.Sy *.a 343libraries, 344installation of the 345.Sy *_pic.a 346libraries on PIC systems, 347building of 348.Sy *.a 349libraries on PIC systems, 350or 351installation of 352.Sy .so 353symlinks on ELF systems. 354.DFLTy 355.Pp 356If 357.Dq no , 358acts as 359.Sy MKPICINSTALL=no MKPROFILE=no . 360. 361.It Sy MKLINT 362.YorN 363Indicates whether 364.Xr lint 1 365will be run against portions of the 366.Nx 367source code during the build, and whether lint libraries will be 368installed into 369.Sy DESTDIR Ns Pa /usr/libdata/lint . 370.DFLTy 371. 372.It Sy MKMAN 373.YorN 374Indicates whether manual pages will be installed during a build. 375.DFLTy 376.Pp 377If 378.Dq no , 379acts as 380.Sy MKCATPAGES=no MKHTML=no . 381. 382.It Sy MKMANZ 383.YorN 384Indicates whether manual pages should be compressed with 385.Xr gzip 1 386at installation time. 387.DFLTn 388. 389.It Sy MKNLS 390.YorN 391Indicates whether Native Language System (NLS) locale zone files will be 392compiled and installed during a build. 393.DFLTy 394. 395.It Sy MKOBJ 396.YorN 397Indicates whether object directories will be created when running 398.Dq make obj . 399If set to 400.Dq no , 401then all built files will be located inside the regular source tree. 402.DFLTy 403.Pp 404If 405.Dq no , 406acts as 407.Sy MKOBJDIRS=no . 408. 409.It Sy MKOBJDIRS 410.YorN 411Indicates whether object directories will be created automatically 412(via a 413.Dq make obj 414pass) at the start of a build. 415.DFLTn 416. 417.It Sy MKPAM 418.YorN 419Indicates whether the 420.Xr pam 8 421framework (libraries and support files) is built. 422The pre-PAM code is not supported and may be removed in the future. 423.DFLTy 424. 425.It Sy MKPF 426.YorN 427Indicates whether the 428.Xr pf 4 429programs, headers and LKM will be compiled and installed during a build. 430.DFLTy 431. 432.It Sy MKPIC 433.YorN 434Indicates whether shared objects and libraries will be created and 435installed during a build. 436If set to 437.Dq no , 438the entire built system will be statically linked. 439.DFLT 440Platform dependent. 441As of this writing, all platforms except 442.Sy m68000 443and 444.Sy sh3 445default to 446.Dq yes . 447.Pp 448If 449.Dq no , 450acts as 451.Sy MKPICLIB=no . 452. 453.It Sy MKPICINSTALL 454.YorN 455Indicates whether the 456.Xr ar 1 457format libraries 458.Sy ( lib*_pic.a ) , 459used to generate shared libraries, are installed during a build. 460.DFLTy 461. 462.It Sy MKPICLIB 463.YorN 464Indicates whether the 465.Xr ar 1 466format libraries 467.Sy ( lib*_pic.a ) , 468used to generate shared libraries. 469.DFLTy 470. 471.It Sy MKPOSTFIX 472.YorN 473Indicates whether Postfix is built. 474.DFLTy 475. 476.It Sy MKPROFILE 477.YorN 478Indicates whether profiled libraries 479.Sy ( lib*_p.a ) 480will be built and installed during a build. 481.DFLT 482.Dq yes ; 483however, some platforms turn off 484.Sy MKPROFILE 485by default at times due to toolchain problems with profiled code. 486. 487.It Sy MKSENDMAIL 488.YorN 489Indicates whether Sendmail is built. 490.DFLTy 491. 492.It Sy MKSHARE 493.YorN 494Indicates whether files destined to reside in 495.Sy DESTDIR Ns Pa /usr/share 496will be built and installed during a build. 497.DFLTy 498.Pp 499If 500.Dq no , 501acts as 502.Sy MKCATPAGES=no MKDOC=no MKINFO=no MKHTML=no MKMAN=no MKNLS=no . 503. 504.It Sy MKSKEY 505.YorN 506Indicates whether the S/key infrastructure 507(libraries and support programs) is built. 508.DFLTy 509. 510.It Sy MKSOFTFLOAT 511.YorN 512Indicates whether the compiler generates output containing 513library calls for floating point and possibly soft-float library 514support. 515.DFLTn 516. 517.It Sy MKUNPRIVED 518.YorN 519Indicates whether an unprivileged install will occur. 520The user, group, permissions, and file flags, will not be set on 521the installed item; instead the information will be appended to 522a file called 523.Pa METALOG 524in 525.Sy DESTDIR . 526The contents of 527.Pa METALOG 528is used during the generation of the distribution tar files to ensure 529that the appropriate file ownership is stored. 530.DFLTn 531. 532.It Sy MKUPDATE 533.YorN 534Indicates whether all install operations intended to write to 535.Sy DESTDIR 536will compare file timestamps before installing, and skip the install 537phase if the destination files are up-to-date. 538This also has implications on full builds (see next subsection). 539.DFLTn 540. 541.It Sy MKUUCP 542.YorN 543Indicates whether 544.Xr uucp 1 545and related programs are built. 546.DFLTy 547. 548.It Sy MKYP 549.YorN 550Indicates whether the YP (NIS) infrastructure 551(libraries and support programs) is built. 552.DFLTy 553. 554.It Sy OBJMACHINE 555If defined, creates objdirs of the form 556.Pa obj. Ns Sy MACHINE , 557where 558.Sy MACHINE 559is the current architecture (as per 560.Sq "uname -m" ) . 561. 562.It Sy RELEASEDIR 563If set, specifies the directory to which a 564.Xr release 7 565layout will be written at the end of a 566.Dq make release . 567.DFLTu 568.Pp 569.Em Note : 570.Sy build.sh 571will provide a default of 572.Pa releasedir 573(in the top-level 574.Sy .OBJDIR ) 575unless run in 576.Sq expert 577mode 578. 579.It Sy TOOLDIR 580Directory to hold the host tools, once built. 581This directory should be unique to a given host system and 582.Nx 583source tree. 584(However, multiple targets may share the same 585.Sy TOOLDIR ; 586the target-dependent files have unique names.) 587If unset, a default based 588on the 589.Xr uname 1 590information of the host platform will be created in the 591.Sy .OBJDIR 592of 593.Pa src . 594.DFLTu 595. 596.It Sy USETOOLS 597Indicates whether the tools specified by 598.Sy TOOLDIR 599should be used as part of a build in progress. 600Must be set to 601.Dq yes 602if cross-compiling. 603.Bl -tag -width "never" 604.It Sy yes 605Use the tools from 606.Sy TOOLDIR . 607.It Sy no 608Do not use the tools from 609.Sy TOOLDIR , 610but refuse to build native compilation tool components that are 611version-specific for that tool. 612.It Sy never 613Do not use the tools from 614.Sy TOOLDIR , 615even when building native tool components. 616This is similar to the traditional 617.Nx 618build method, but does 619.Em not 620verify that the compilation tools in use are up-to-date enough in order 621to build the tree successfully. 622This may cause build or runtime problems when building the whole 623.Nx 624source tree. 625.El 626.DFLT 627.Dq yes 628if building all or part of a whole 629.Nx 630source tree (detected automatically); 631.Dq no 632otherwise (to preserve traditional semantics of the 633.Aq bsd.*.mk 634.Xr make 1 635include files). 636. 637.El 638. 639.Ss pkgsrc system variables 640. 641Please see 642.Xr packages 7 643for more variables used internally by the package system and 644.Pa ${PKGSRCDIR}/mk/defaults/mk.conf 645for package-specific examples. 646. 647.Sh FILES 648.Bl -tag -width /etc/mk.conf 649. 650.It Pa /etc/mk.conf 651This file. 652. 653.It Pa ${PKGSRCDIR}/mk/defaults/mk.conf 654Examples for settings regarding the pkgsrc collection. 655.El 656. 657.Sh SEE ALSO 658.Xr make 1 , 659.Xr packages 7 , 660.Pa /usr/share/mk/bsd.README 661.Sh HISTORY 662The 663.Nm 664file appeared in 665.Nx 1.2 . 666