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