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