1.\" $NetBSD: mk.conf.5,v 1.20 2004/07/02 18:20:27 junyoung 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 July 1, 2004 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 NetBSD sources. 83If 84.Xr make 1 85is run from within the NetBSD source tree, the default is the top 86level of that tree (as determined by the presence of 87.Pa build.sh 88and 89.Pa tools/ ) , 90otherwise 91.Sy BSDSRCDIR 92will be used. 93. 94.It Sy BSDOBJDIR 95The real path to the 96.Sq obj 97tree for the NetBSD source tree. 98.DFLT 99.Pa /usr/obj 100. 101.It Sy BSDSRCDIR 102The real path to the NetBSD source tree. 103.DFLT 104.Pa /usr/src 105. 106.It Sy BUILD 107If defined, 108.Sq "make install" 109checks that the targets in the source directories are up-to-date and 110re-makes them if they are out of date, instead of blindly trying to install 111out of date or non-existent targets. 112.DFLTu 113. 114.It Sy BUILDID 115Identifier for the build. 116The identifier will be appended to 117object directory names, and can be consulted in the 118.Xr make 1 119configuration file in order to set additional build parameters, 120such as compiler flags. 121.DFLTu 122. 123.It Sy COPTS 124Extra options for the C compiler. 125Should be appended to (e.g., 126.Sy COPTS+=-g ) , 127rather than explicitly set. 128. 129.It Sy DESTDIR 130Directory to contain the built 131.Nx 132system. 133If set, special options are passed to the compilation tools to 134prevent their default use of the host system's 135.Sy /usr/include , /usr/lib , 136and so forth. 137This pathname should 138.Em not 139end with a slash 140.Pq / 141character (for installation into the system's root directory, set 142.Sy DESTDIR 143to an empty string). 144The directory must reside on a file system which supports long file 145names and hard links. 146.DFLT 147Empty string if 148.Sy USETOOLS 149is 150.Dq yes ; 151unset otherwise. 152.Pp 153.Em Note : 154.Sy build.sh 155will provide a default of 156.Pa destdir. Ns Sy MACHINE 157(in the top-level 158.Sy .OBJDIR ) 159unless run in 160.Sq expert 161mode 162. 163.It Sy MKBFD 164.YorN 165Indicates whether 166.Sy libbfd , 167.Sy libiberty , 168or any of the things that depend 169upon them (such as the binutils, 170.Xr as 1 , 171.Xr gdb 1 , 172.Xr ld 1 , 173.Xr dbsym 8 , 174or 175.Xr mdsetimage 8) 176should be built. 177.DFLTy 178. 179.It Sy MKCATPAGES 180.YorN 181Indicates whether preformatted plaintext manual pages will be created 182during a build. 183.DFLTy 184. 185.It Sy MKCRYPTO 186.YorN 187Indicates whether cryptographic code will be included in a build; 188provided for the benefit of countries that do not allow strong 189cryptography. 190Will not affect use of the standard low-security password encryption system, 191.Xr crypt 3 . 192.DFLTy 193.Pp 194If 195.Dq no , 196acts as 197.Sy MKKERBEROS=no . 198. 199.It Sy MKCRYPTO_IDEA 200.YorN 201Indicates whether IDEA support will be built into 202.Sy libcrypto_idea.a. 203.DFLTn 204. 205.It Sy MKCRYPTO_MDC2 206.YorN 207Indicates whether MDC2 support will be built into 208.Sy libcrypto_mdc2.a. 209.DFLTn 210. 211.It Sy MKCRYPTO_RC5 212.YorN 213Indicates whether RC5 support will be built into 214.Sy libcrypto_rc5.a. 215.DFLTn 216. 217.It Sy MKCVS 218.YorN 219Indicates whether 220.Xr cvs 1 221is built. 222.DFLTy 223. 224.It Sy MKDOC 225.YorN 226Indicates whether system documentation destined for 227.Sy DESTDIR Ns Pa /usr/share/doc 228will be installed during a build. 229.DFLTy 230. 231.It Sy MKDYNAMICROOT 232.YorN 233Indicates whether all programs should be dynamically linked, 234and to install shared libraries required by 235.Pa /bin 236and 237.Pa /sbin 238and the shared linker 239.Xr ld.elf_so 1 240into 241.Pa /lib . 242If 243.Sq no , 244link programs in 245.Pa /bin 246and 247.Pa /sbin 248statically. 249.DFTLy 250. 251.It Sy MKGCC 252.YorN 253Indicates whether 254.Xr gcc 1 255or any related libraries 256.Pq Sy libg2c , libgcc , libobjc , libstdc+ 257are built. 258.DFLTy 259. 260.It Sy MKGDB 261.YorN 262Indicates whether 263.Xr gdb 1 264is built. 265.DFLTy 266. 267.It Sy MKHESIOD 268.YorN 269Indicates whether the Hesiod infrastructure 270(libraries and support programs) is built. 271.DFLTy 272. 273.It Sy MKHOSTOBJ 274.YorN 275If set to 276.Dq yes , 277then for programs intended to be run on the compile host, 278the name, release, and architecture of the host operating system 279will be suffixed to the name of the object directory created by 280.Dq make obj . 281(This allows multiple host systems to compile NetBSD for a single target.) 282If set to 283.Dq no , 284then programs built to be run on the compile host will use the same 285object directory names as programs built to be run on the target. 286.DFLTn 287. 288.It Sy MKHTML 289.YorN 290Indicates whether the html manual pages are built and installed. 291.DFLTy 292. 293.It Sy MKIEEEFP 294.YorN 295Indicates whether code for IEEE754/IEC60559 conformance is built. 296Has no effect on most platforms. 297.DFLTy 298. 299.It Sy MKINFO 300.YorN 301Indicates whether GNU Info files, used for the documentation for 302most of the compilation tools, will be created and installed during a 303build. 304.DFLTy 305. 306.It Sy MKKERBEROS4 307.YorN 308Indicates whether the Kerberos v4 infrastructure 309(libraries and support programs) is built. 310.DFLTy 311. 312.It Sy MKKERBEROS 313.YorN 314Indicates whether the Kerberos v5 infrastructure 315(libraries and support programs) is built. 316.DFLTy 317. 318.It Sy MKLINKLIB 319.YorN 320Indicates whether all of the shared library infrastructure is built. 321If 322.Sq no , 323prevents: 324installation of the 325.Sy *.a 326libraries, 327installation of the 328.Sy *_pic.a 329libraries on PIC systems, 330building of 331.Sy *.a 332libraries on PIC systems, 333or 334installation of 335.Sy .so 336symlinks on ELF systems. 337.DFLTy 338.Pp 339If 340.Dq no , 341acts as 342.Sy MKPICINSTALL=no MKPROFILE=no . 343. 344.It Sy MKLINT 345.YorN 346Indicates whether 347.Xr lint 1 348will be run against portions of the 349.Nx 350source code during the build, and whether lint libraries will be 351installed into 352.Sy DESTDIR Ns Pa /usr/libdata/lint . 353.DFLTy 354. 355.It Sy MKMAN 356.YorN 357Indicates whether manual pages will be installed during a build. 358.DFLTy 359.Pp 360If 361.Dq no , 362acts as 363.Sy MKCATPAGES=no MKHTML=no . 364. 365.It Sy MKMANZ 366.YorN 367Indicates whether manual pages should be compressed with 368.Xr gzip 1 369at installation time. 370.DFLTn 371. 372.It Sy MKNLS 373.YorN 374Indicates whether Native Language System (NLS) locale zone files will be 375compiled and installed during a build. 376.DFLTy 377. 378.It Sy MKOBJ 379.YorN 380Indicates whether object directories will be created when running 381.Dq make obj . 382If set to 383.Dq no , 384then all built files will be located inside the regular source tree. 385.DFLTy 386.Pp 387If 388.Dq no , 389acts as 390.Sy MKOBJDIRS=no . 391. 392.It Sy MKOBJDIRS 393.YorN 394Indicates whether object directories will be created automatically 395(via a 396.Dq make obj 397pass) at the start of a build. 398.DFLTn 399. 400.It Sy MKPIC 401.YorN 402Indicates whether shared objects and libraries will be created and 403installed during a build. 404If set to 405.Dq no , 406the entire built system will be statically linked. 407.DFLT 408Platform dependent. 409As of this writing, all platforms except 410.Sy m68000 411and 412.Sy sh3 413default to 414.Dq yes . 415.Pp 416If 417.Dq no , 418acts as 419.Sy MKPICLIB=no . 420. 421.It Sy MKPICINSTALL 422.YorN 423Indicates whether the 424.Xr ar 1 425format libraries 426.Sy ( lib*_pic.a ) , 427used to generate shared libraries, are installed during a build. 428.DFLTy 429. 430.It Sy MKPICLIB 431.YorN 432Indicates whether the 433.Xr ar 1 434format libraries 435.Sy ( lib*_pic.a ) , 436used to generate shared libraries. 437.DFLTy 438. 439.It Sy MKPOSTFIX 440.YorN 441Indicates whether Postfix is built. 442.DFLTy 443. 444.It Sy MKPROFILE 445.YorN 446Indicates whether profiled libraries 447.Sy ( lib*_p.a ) 448will be built and installed during a build. 449.DFLT 450.Dq yes ; 451however, some platforms turn off 452.Sy MKPROFILE 453by default at times due to toolchain problems with profiled code. 454. 455.It Sy MKSENDMAIL 456.YorN 457Indicates whether Sendmail is built. 458.DFLTy 459. 460.It Sy MKSHARE 461.YorN 462Indicates whether files destined to reside in 463.Sy DESTDIR Ns Pa /usr/share 464will be built and installed during a build. 465.DFLTy 466.Pp 467If 468.Dq no , 469acts as 470.Sy MKCATPAGES=no MKDOC=no MKINFO=no MKHTML=no MKMAN=no MKNLS=no . 471. 472.It Sy MKSKEY 473.YorN 474Indicates whether the S/key infrastructure 475(libraries and support programs) is built. 476.DFLTy 477. 478.It Sy MKSOFTFLOAT 479.YorN 480Indicates whether the compiler generates output containing 481library calls for floating point and possibly soft-float library 482support. 483.DFLTn 484. 485.It Sy MKUNPRIVED 486.YorN 487Indicates whether an unprivileged install will occur. 488The user, group, permissions, and file flags, will not be set on 489the installed item; instead the information will be appended to 490a file called 491.Pa METALOG 492in 493.Sy DESTDIR . 494The contents of 495.Pa METALOG 496is used during the generation of the distribution tar files to ensure 497that the appropriate file ownership is stored. 498.DFLTn 499. 500.It Sy MKUPDATE 501.YorN 502Indicates whether all install operations intended to write to 503.Sy DESTDIR 504will compare file timestamps before installing, and skip the install 505phase if the destination files are up-to-date. 506This also has implications on full builds (see next subsection). 507.DFLTn 508. 509.It Sy MKUUCP 510.YorN 511Indicates whether 512.Xr uucp 1 513and related programs are built. 514.DFLTy 515. 516.It Sy MKYP 517.YorN 518Indicates whether the YP (NIS) infrastructure 519(libraries and support programs) is built. 520.DFLTy 521. 522.It Sy OBJMACHINE 523If defined, creates objdirs of the form 524.Pa obj. Ns Sy MACHINE , 525where 526.Sy MACHINE 527is the current architecture (as per 528.Sq "uname -m" ) . 529. 530.It Sy RELEASEDIR 531If set, specifies the directory to which a 532.Xr release 7 533layout will be written at the end of a 534.Dq make release . 535.DFLTu 536.Pp 537.Em Note : 538.Sy build.sh 539will provide a default of 540.Pa releasedir 541(in the top-level 542.Sy .OBJDIR ) 543unless run in 544.Sq expert 545mode 546. 547.It Sy TOOLDIR 548Directory to hold the host tools, once built. 549This directory should be unique to a given host system and 550.Nx 551source tree. 552(However, multiple targets may share the same 553.Sy TOOLDIR ; 554the target-dependent files have unique names.) 555If unset, a default based 556on the 557.Xr uname 1 558information of the host platform will be created in the 559.Sy .OBJDIR 560of 561.Pa src . 562.DFLTu 563. 564.It Sy USETOOLS 565Indicates whether the tools specified by 566.Sy TOOLDIR 567should be used as part of a build in progress. 568Must be set to 569.Dq yes 570if cross-compiling. 571.Bl -tag -width "never" 572.It Sy yes 573Use the tools from 574.Sy TOOLDIR . 575.It Sy no 576Do not use the tools from 577.Sy TOOLDIR , 578but refuse to build native compilation tool components that are 579version-specific for that tool. 580.It Sy never 581Do not use the tools from 582.Sy TOOLDIR , 583even when building native tool components. 584This is similar to the traditional 585.Nx 586build method, but does 587.Em not 588verify that the compilation tools in use are up-to-date enough in order 589to build the tree successfully. 590This may cause build or runtime problems when building the whole 591.Nx 592source tree. 593.El 594.DFLT 595.Dq yes 596if building all or part of a whole 597.Nx 598source tree (detected automatically); 599.Dq no 600otherwise (to preserve traditional semantics of the 601.Aq bsd.*.mk 602.Xr make 1 603include files). 604. 605.El 606. 607.Ss pkgsrc system variables 608. 609Please see 610.Xr packages 7 611for more variables used internally by the package system and 612.Pa ${PKGSRCDIR}/mk/bsd.pkg.defaults.mk 613for package-specific examples. 614. 615.Sh FILES 616.Bl -tag -width /etc/mk.conf 617. 618.It Pa /etc/mk.conf 619This file. 620. 621.It Pa ${PKGSRCDIR}/mk/bsd.pkg.defaults.mk 622Examples for settings regarding the pkgsrc collection. 623.El 624. 625.Sh SEE ALSO 626.Xr make 1 , 627.Xr packages 7 628. 629.Sh HISTORY 630The 631.Nm 632file appeared in 633.Nx 1.2 . 634