xref: /netbsd-src/share/man/man5/mk.conf.5 (revision 7c3f385475147b6e1c4753f2bee961630e2dfc40)
1.\"	$NetBSD: mk.conf.5,v 1.37 2008/03/22 12:29:02 jmmv 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 22, 2008
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.
136Note that
137.Sy CPUFLAGS ,
138not
139.Sy COPTS ,
140should be used for
141compiler flags that select CPU-related options.
142Also note that
143.Sy CFLAGS
144should never be set in
145.Nm .
146.
147.It Sy CPUFLAGS
148Additional flags passed to the compiler/assembler to select
149CPU instruction set options, CPU tuning options, etc.
150Such options should not be specified in
151.Sy COPTS ,
152because some parts of the build process need to override
153CPU-related compiler options.
154.
155.It Sy DESTDIR
156Directory to contain the built
157.Nx
158system.
159If set, special options are passed to the compilation tools to
160prevent their default use of the host system's
161.Sy /usr/include , /usr/lib ,
162and so forth.
163This pathname should
164.Em not
165end with a slash
166.Pq /
167character (for installation into the system's root directory, set
168.Sy DESTDIR
169to an empty string).
170The directory must reside on a file system which supports long file
171names and hard links.
172.DFLT
173Empty string if
174.Sy USETOOLS
175is
176.Dq yes ;
177unset otherwise.
178.Pp
179.Em Note :
180.Sy build.sh
181will provide a default of
182.Pa destdir. Ns Sy MACHINE
183(in the top-level
184.Sy .OBJDIR )
185unless run in
186.Sq expert
187mode
188.
189.It Sy MKBFD
190.YorN
191Indicates whether
192.Sy libbfd ,
193.Sy libiberty ,
194or any of the things that depend
195upon them (such as the binutils,
196.Xr as 1 ,
197.Xr gdb 1 ,
198.Xr ld 1 ,
199.Xr dbsym 8 ,
200or
201.Xr mdsetimage 8 )
202should be built.
203.DFLTy
204.
205.It Sy MKCATPAGES
206.YorN
207Indicates whether preformatted plaintext manual pages will be created
208during a build.
209.DFLTy
210.
211.It Sy MKCRYPTO
212.YorN
213Indicates whether cryptographic code will be included in a build;
214provided for the benefit of countries that do not allow strong
215cryptography.
216Will not affect use of the standard low-security password encryption system,
217.Xr crypt 3 .
218.DFLTy
219.Pp
220If
221.Dq no ,
222acts as
223.Sy MKKERBEROS=no .
224.
225.It Sy MKCRYPTO_IDEA
226.YorN
227Indicates whether IDEA support will be built into
228.Sy libcrypto_idea.a .
229.DFLTn
230.
231.It Sy MKCRYPTO_MDC2
232.YorN
233Indicates whether MDC2 support will be built into
234.Sy libcrypto_mdc2.a .
235.DFLTn
236.
237.It Sy MKCRYPTO_RC5
238.YorN
239Indicates whether RC5 support will be built into
240.Sy libcrypto_rc5.a .
241.DFLTn
242.
243.It Sy MKCVS
244.YorN
245Indicates whether
246.Xr cvs 1
247is built.
248.DFLTy
249.
250.It Sy MKDEBUG
251.YorN
252Indicates whether separate debugging symbols should be installed into
253.Sy DESTDIR Ns Pa /usr/libdata/debug .
254.DFLTn
255.
256.It Sy MKDEBUGLIB
257.YorN
258Indicates whether debug libraries
259.Sy ( lib*_g.a )
260will be built and installed during a build.
261Debug libraries are compiled with
262.Dq Li -g -DDEBUG .
263.DFLTn
264.
265.It Sy MKDOC
266.YorN
267Indicates whether system documentation destined for
268.Sy DESTDIR Ns Pa /usr/share/doc
269will be installed during a build.
270.DFLTy
271.
272.It Sy MKDYNAMICROOT
273.YorN
274Indicates whether all programs should be dynamically linked,
275and to install shared libraries required by
276.Pa /bin
277and
278.Pa /sbin
279and the shared linker
280.Xr ld.elf_so 1
281into
282.Pa /lib .
283If
284.Sq no ,
285link programs in
286.Pa /bin
287and
288.Pa /sbin
289statically.
290.DFTLy
291.
292.It Sy MKGCC
293.YorN
294Indicates whether
295.Xr gcc 1
296or any related libraries
297.Pq Sy libg2c , libgcc , libobjc , libstdc+
298are built.
299.DFLTy
300.
301.It Sy MKGDB
302.YorN
303Indicates whether
304.Xr gdb 1
305is built.
306.DFLTy
307.
308.It Sy MKHESIOD
309.YorN
310Indicates whether the Hesiod infrastructure
311(libraries and support programs) is built.
312.DFLTy
313.
314.It Sy MKHOSTOBJ
315.YorN
316If set to
317.Dq yes ,
318then for programs intended to be run on the compile host,
319the name, release, and architecture of the host operating system
320will be suffixed to the name of the object directory created by
321.Dq make obj .
322(This allows multiple host systems to compile
323.Nx
324for a single target.)
325If set to
326.Dq no ,
327then programs built to be run on the compile host will use the same
328object directory names as programs built to be run on the target.
329.DFLTn
330.
331.It Sy MKHTML
332.YorN
333Indicates whether the html manual pages are built and installed.
334.DFLTy
335.
336.It Sy MKIEEEFP
337.YorN
338Indicates whether code for IEEE754/IEC60559 conformance is built.
339Has no effect on most platforms.
340.DFLTy
341.
342.It Sy MKINFO
343.YorN
344Indicates whether GNU Info files, used for the documentation for
345most of the compilation tools, will be created and installed during a
346build.
347.DFLTy
348.
349.It Sy MKIPFILTER
350.YorN
351Indicates whether the
352.Xr ipf 4
353programs, headers and LKM will be compiled and installed during a build.
354.DFLTy
355.
356.It Sy MKKERBEROS
357.YorN
358Indicates whether the Kerberos v5 infrastructure
359(libraries and support programs) is built.
360.DFLTy
361.
362.It Sy MKLINKLIB
363.YorN
364Indicates whether all of the shared library infrastructure is built.
365If
366.Sq no ,
367prevents:
368installation of the
369.Sy *.a
370libraries,
371installation of the
372.Sy *_pic.a
373libraries on PIC systems,
374building of
375.Sy *.a
376libraries on PIC systems,
377or
378installation of
379.Sy .so
380symlinks on ELF systems.
381.DFLTy
382.Pp
383If
384.Dq no ,
385acts as
386.Sy MKPICINSTALL=no MKPROFILE=no .
387.
388.It Sy MKLINT
389.YorN
390Indicates whether
391.Xr lint 1
392will be run against portions of the
393.Nx
394source code during the build, and whether lint libraries will be
395installed into
396.Sy DESTDIR Ns Pa /usr/libdata/lint .
397.DFLTy
398.
399.It Sy MKMAN
400.YorN
401Indicates whether manual pages will be installed during a build.
402.DFLTy
403.Pp
404If
405.Dq no ,
406acts as
407.Sy MKCATPAGES=no MKHTML=no .
408.
409.It Sy MKMANZ
410.YorN
411Indicates whether manual pages should be compressed with
412.Xr gzip 1
413at installation time.
414.DFLTn
415.
416.It Sy MKMODULAR
417.YorN
418Indicates whether support for the new kernel modules framework should be
419built.
420This will install new versions of
421.Xr modload 8 ,
422.Xr modstat 8
423and
424.Xr modunload 8
425that will not work with the ones used to manage LKMs.
426You will also need a kernel built with
427.Cd options MODULAR
428for this to be useful.
429.DFLTn
430.
431.It Sy MKNLS
432.YorN
433Indicates whether Native Language System (NLS) locale zone files will be
434compiled and installed during a build.
435.DFLTy
436.
437.It Sy MKOBJ
438.YorN
439Indicates whether object directories will be created when running
440.Dq make obj .
441If set to
442.Dq no ,
443then all built files will be located inside the regular source tree.
444.DFLTy
445.Pp
446If
447.Dq no ,
448acts as
449.Sy MKOBJDIRS=no .
450.
451.It Sy MKOBJDIRS
452.YorN
453Indicates whether object directories will be created automatically
454(via a
455.Dq make obj
456pass) at the start of a build.
457.DFLTn
458.
459.It Sy MKPAM
460.YorN
461Indicates whether the
462.Xr pam 8
463framework (libraries and support files) is built.
464The pre-PAM code is not supported and may be removed in the future.
465.DFLTy
466.
467.It Sy MKPF
468.YorN
469Indicates whether the
470.Xr pf 4
471programs, headers and LKM will be compiled and installed during a build.
472.DFLTy
473.
474.It Sy MKPIC
475.YorN
476Indicates whether shared objects and libraries will be created and
477installed during a build.
478If set to
479.Dq no ,
480the entire built system will be statically linked.
481.DFLT
482Platform dependent.
483As of this writing, all platforms except
484.Sy m68000
485and
486.Sy sh3
487default to
488.Dq yes .
489.Pp
490If
491.Dq no ,
492acts as
493.Sy MKPICLIB=no .
494.
495.It Sy MKPICINSTALL
496.YorN
497Indicates whether the
498.Xr ar 1
499format libraries
500.Sy ( lib*_pic.a ) ,
501used to generate shared libraries, are installed during a build.
502.DFLTy
503.
504.It Sy MKPICLIB
505.YorN
506Indicates whether the
507.Xr ar 1
508format libraries
509.Sy ( lib*_pic.a ) ,
510used to generate shared libraries.
511.DFLTy
512.
513.It Sy MKPOSTFIX
514.YorN
515Indicates whether Postfix is built.
516.DFLTy
517.
518.It Sy MKPROFILE
519.YorN
520Indicates whether profiled libraries
521.Sy ( lib*_p.a )
522will be built and installed during a build.
523.DFLT
524.Dq yes ;
525however, some platforms turn off
526.Sy MKPROFILE
527by default at times due to toolchain problems with profiled code.
528.
529.It Sy MKSHARE
530.YorN
531Indicates whether files destined to reside in
532.Sy DESTDIR Ns Pa /usr/share
533will be built and installed during a build.
534.DFLTy
535.Pp
536If
537.Dq no ,
538acts as
539.Sy MKCATPAGES=no MKDOC=no MKINFO=no MKHTML=no MKMAN=no MKNLS=no .
540.
541.It Sy MKSKEY
542.YorN
543Indicates whether the S/key infrastructure
544(libraries and support programs) is built.
545.DFLTy
546.
547.It Sy MKSOFTFLOAT
548.YorN
549Indicates whether the compiler generates output containing
550library calls for floating point and possibly soft-float library
551support.
552.DFLTn
553.
554.It Sy MKUNPRIVED
555.YorN
556Indicates whether an unprivileged install will occur.
557The user, group, permissions, and file flags, will not be set on
558the installed item; instead the information will be appended to
559a file called
560.Pa METALOG
561in
562.Sy DESTDIR .
563The contents of
564.Pa METALOG
565is used during the generation of the distribution tar files to ensure
566that the appropriate file ownership is stored.
567.DFLTn
568.
569.It Sy MKUPDATE
570.YorN
571Indicates whether all install operations intended to write to
572.Sy DESTDIR
573will compare file timestamps before installing, and skip the install
574phase if the destination files are up-to-date.
575This also has implications on full builds (see next subsection).
576.DFLTn
577.
578.It Sy MKYP
579.YorN
580Indicates whether the YP (NIS) infrastructure
581(libraries and support programs) is built.
582.DFLTy
583.
584.It Sy OBJMACHINE
585If defined, creates objdirs of the form
586.Pa obj. Ns Sy MACHINE ,
587where
588.Sy MACHINE
589is the current architecture (as per
590.Sq "uname -m" ) .
591.
592.It Sy RELEASEDIR
593If set, specifies the directory to which a
594.Xr release 7
595layout will be written at the end of a
596.Dq make release .
597.DFLTu
598.Pp
599.Em Note :
600.Sy build.sh
601will provide a default of
602.Pa releasedir
603(in the top-level
604.Sy .OBJDIR )
605unless run in
606.Sq expert
607mode
608.
609.It Sy TOOLDIR
610Directory to hold the host tools, once built.
611This directory should be unique to a given host system and
612.Nx
613source tree.
614(However, multiple targets may share the same
615.Sy TOOLDIR ;
616the target-dependent files have unique names.)
617If unset, a default based
618on the
619.Xr uname 1
620information of the host platform will be created in the
621.Sy .OBJDIR
622of
623.Pa src .
624.DFLTu
625.
626.It Sy USETOOLS
627Indicates whether the tools specified by
628.Sy TOOLDIR
629should be used as part of a build in progress.
630Must be set to
631.Dq yes
632if cross-compiling.
633.Bl -tag -width "never"
634.It Sy yes
635Use the tools from
636.Sy TOOLDIR .
637.It Sy no
638Do not use the tools from
639.Sy TOOLDIR ,
640but refuse to build native compilation tool components that are
641version-specific for that tool.
642.It Sy never
643Do not use the tools from
644.Sy TOOLDIR ,
645even when building native tool components.
646This is similar to the traditional
647.Nx
648build method, but does
649.Em not
650verify that the compilation tools in use are up-to-date enough in order
651to build the tree successfully.
652This may cause build or runtime problems when building the whole
653.Nx
654source tree.
655.El
656.DFLT
657.Dq yes
658if building all or part of a whole
659.Nx
660source tree (detected automatically);
661.Dq no
662otherwise (to preserve traditional semantics of the
663.Aq bsd.*.mk
664.Xr make 1
665include files).
666.
667.El
668.
669.Ss pkgsrc system variables
670.
671Please see the pkgsrc guide at
672.Pa http://www.netbsd.org/Documentation/pkgsrc/
673or
674.Pa pkgsrc/doc/pkgsrc.txt
675for more variables used internally by the package system and
676.Pa ${PKGSRCDIR}/mk/defaults/mk.conf
677for package-specific examples.
678.
679.Sh FILES
680.Bl -tag -width /etc/mk.conf
681.
682.It Pa /etc/mk.conf
683This file.
684.
685.It Pa ${PKGSRCDIR}/mk/defaults/mk.conf
686Examples for settings regarding the pkgsrc collection.
687.El
688.
689.Sh SEE ALSO
690.Xr make 1 ,
691.Pa /usr/share/mk/bsd.README ,
692.Pa pkgsrc/doc/pkgsrc.txt ,
693.Pa http://www.netbsd.org/Documentation/pkgsrc/
694.Sh HISTORY
695The
696.Nm
697file appeared in
698.Nx 1.2 .
699