1.\" $NetBSD: mk.conf.5,v 1.31 2006/03/20 04:03:23 christos 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 March 19, 2006 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 MKKERBEROS 324.YorN 325Indicates whether the Kerberos v5 infrastructure 326(libraries and support programs) is built. 327.DFLTy 328. 329.It Sy MKLINKLIB 330.YorN 331Indicates whether all of the shared library infrastructure is built. 332If 333.Sq no , 334prevents: 335installation of the 336.Sy *.a 337libraries, 338installation of the 339.Sy *_pic.a 340libraries on PIC systems, 341building of 342.Sy *.a 343libraries on PIC systems, 344or 345installation of 346.Sy .so 347symlinks on ELF systems. 348.DFLTy 349.Pp 350If 351.Dq no , 352acts as 353.Sy MKPICINSTALL=no MKPROFILE=no . 354. 355.It Sy MKLINT 356.YorN 357Indicates whether 358.Xr lint 1 359will be run against portions of the 360.Nx 361source code during the build, and whether lint libraries will be 362installed into 363.Sy DESTDIR Ns Pa /usr/libdata/lint . 364.DFLTy 365. 366.It Sy MKMAN 367.YorN 368Indicates whether manual pages will be installed during a build. 369.DFLTy 370.Pp 371If 372.Dq no , 373acts as 374.Sy MKCATPAGES=no MKHTML=no . 375. 376.It Sy MKMANZ 377.YorN 378Indicates whether manual pages should be compressed with 379.Xr gzip 1 380at installation time. 381.DFLTn 382. 383.It Sy MKNLS 384.YorN 385Indicates whether Native Language System (NLS) locale zone files will be 386compiled and installed during a build. 387.DFLTy 388. 389.It Sy MKOBJ 390.YorN 391Indicates whether object directories will be created when running 392.Dq make obj . 393If set to 394.Dq no , 395then all built files will be located inside the regular source tree. 396.DFLTy 397.Pp 398If 399.Dq no , 400acts as 401.Sy MKOBJDIRS=no . 402. 403.It Sy MKOBJDIRS 404.YorN 405Indicates whether object directories will be created automatically 406(via a 407.Dq make obj 408pass) at the start of a build. 409.DFLTn 410. 411.It Sy MKPAM 412.YorN 413Indicates whether the 414.Xr pam 8 415framework (libraries and support files) is built. 416The pre-PAM code is not supported and may be removed in the future. 417.DFLTy 418. 419.It Sy MKPF 420.YorN 421Indicates whether the 422.Xr pf 4 423programs, headers and LKM will be compiled and installed during a build. 424.DFLTy 425. 426.It Sy MKPIC 427.YorN 428Indicates whether shared objects and libraries will be created and 429installed during a build. 430If set to 431.Dq no , 432the entire built system will be statically linked. 433.DFLT 434Platform dependent. 435As of this writing, all platforms except 436.Sy m68000 437and 438.Sy sh3 439default to 440.Dq yes . 441.Pp 442If 443.Dq no , 444acts as 445.Sy MKPICLIB=no . 446. 447.It Sy MKPICINSTALL 448.YorN 449Indicates whether the 450.Xr ar 1 451format libraries 452.Sy ( lib*_pic.a ) , 453used to generate shared libraries, are installed during a build. 454.DFLTy 455. 456.It Sy MKPICLIB 457.YorN 458Indicates whether the 459.Xr ar 1 460format libraries 461.Sy ( lib*_pic.a ) , 462used to generate shared libraries. 463.DFLTy 464. 465.It Sy MKPOSTFIX 466.YorN 467Indicates whether Postfix is built. 468.DFLTy 469. 470.It Sy MKPROFILE 471.YorN 472Indicates whether profiled libraries 473.Sy ( lib*_p.a ) 474will be built and installed during a build. 475.DFLT 476.Dq yes ; 477however, some platforms turn off 478.Sy MKPROFILE 479by default at times due to toolchain problems with profiled code. 480. 481.It Sy MKSENDMAIL 482.YorN 483Indicates whether Sendmail is built. 484.DFLTy 485. 486.It Sy MKSHARE 487.YorN 488Indicates whether files destined to reside in 489.Sy DESTDIR Ns Pa /usr/share 490will be built and installed during a build. 491.DFLTy 492.Pp 493If 494.Dq no , 495acts as 496.Sy MKCATPAGES=no MKDOC=no MKINFO=no MKHTML=no MKMAN=no MKNLS=no . 497. 498.It Sy MKSKEY 499.YorN 500Indicates whether the S/key infrastructure 501(libraries and support programs) is built. 502.DFLTy 503. 504.It Sy MKSOFTFLOAT 505.YorN 506Indicates whether the compiler generates output containing 507library calls for floating point and possibly soft-float library 508support. 509.DFLTn 510. 511.It Sy MKUNPRIVED 512.YorN 513Indicates whether an unprivileged install will occur. 514The user, group, permissions, and file flags, will not be set on 515the installed item; instead the information will be appended to 516a file called 517.Pa METALOG 518in 519.Sy DESTDIR . 520The contents of 521.Pa METALOG 522is used during the generation of the distribution tar files to ensure 523that the appropriate file ownership is stored. 524.DFLTn 525. 526.It Sy MKUPDATE 527.YorN 528Indicates whether all install operations intended to write to 529.Sy DESTDIR 530will compare file timestamps before installing, and skip the install 531phase if the destination files are up-to-date. 532This also has implications on full builds (see next subsection). 533.DFLTn 534. 535.It Sy MKUUCP 536.YorN 537Indicates whether 538.Xr uucp 1 539and related programs are built. 540.DFLTy 541. 542.It Sy MKYP 543.YorN 544Indicates whether the YP (NIS) infrastructure 545(libraries and support programs) is built. 546.DFLTy 547. 548.It Sy OBJMACHINE 549If defined, creates objdirs of the form 550.Pa obj. Ns Sy MACHINE , 551where 552.Sy MACHINE 553is the current architecture (as per 554.Sq "uname -m" ) . 555. 556.It Sy RELEASEDIR 557If set, specifies the directory to which a 558.Xr release 7 559layout will be written at the end of a 560.Dq make release . 561.DFLTu 562.Pp 563.Em Note : 564.Sy build.sh 565will provide a default of 566.Pa releasedir 567(in the top-level 568.Sy .OBJDIR ) 569unless run in 570.Sq expert 571mode 572. 573.It Sy TOOLDIR 574Directory to hold the host tools, once built. 575This directory should be unique to a given host system and 576.Nx 577source tree. 578(However, multiple targets may share the same 579.Sy TOOLDIR ; 580the target-dependent files have unique names.) 581If unset, a default based 582on the 583.Xr uname 1 584information of the host platform will be created in the 585.Sy .OBJDIR 586of 587.Pa src . 588.DFLTu 589. 590.It Sy USETOOLS 591Indicates whether the tools specified by 592.Sy TOOLDIR 593should be used as part of a build in progress. 594Must be set to 595.Dq yes 596if cross-compiling. 597.Bl -tag -width "never" 598.It Sy yes 599Use the tools from 600.Sy TOOLDIR . 601.It Sy no 602Do not use the tools from 603.Sy TOOLDIR , 604but refuse to build native compilation tool components that are 605version-specific for that tool. 606.It Sy never 607Do not use the tools from 608.Sy TOOLDIR , 609even when building native tool components. 610This is similar to the traditional 611.Nx 612build method, but does 613.Em not 614verify that the compilation tools in use are up-to-date enough in order 615to build the tree successfully. 616This may cause build or runtime problems when building the whole 617.Nx 618source tree. 619.El 620.DFLT 621.Dq yes 622if building all or part of a whole 623.Nx 624source tree (detected automatically); 625.Dq no 626otherwise (to preserve traditional semantics of the 627.Aq bsd.*.mk 628.Xr make 1 629include files). 630. 631.El 632. 633.Ss pkgsrc system variables 634. 635Please see 636.Xr packages 7 637for more variables used internally by the package system and 638.Pa ${PKGSRCDIR}/mk/defaults/mk.conf 639for package-specific examples. 640. 641.Sh FILES 642.Bl -tag -width /etc/mk.conf 643. 644.It Pa /etc/mk.conf 645This file. 646. 647.It Pa ${PKGSRCDIR}/mk/defaults/mk.conf 648Examples for settings regarding the pkgsrc collection. 649.El 650. 651.Sh SEE ALSO 652.Xr make 1 , 653.Xr packages 7 , 654.Pa /usr/share/mk/bsd.README 655.Sh HISTORY 656The 657.Nm 658file appeared in 659.Nx 1.2 . 660