xref: /netbsd-src/share/man/man5/mk.conf.5 (revision 8b0f9554ff8762542c4defc4f70e1eb76fb508fa)
1.\"	$NetBSD: mk.conf.5,v 1.36 2007/12/12 19:52:02 apb 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 December 12, 2007
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 MKNLS
417.YorN
418Indicates whether Native Language System (NLS) locale zone files will be
419compiled and installed during a build.
420.DFLTy
421.
422.It Sy MKOBJ
423.YorN
424Indicates whether object directories will be created when running
425.Dq make obj .
426If set to
427.Dq no ,
428then all built files will be located inside the regular source tree.
429.DFLTy
430.Pp
431If
432.Dq no ,
433acts as
434.Sy MKOBJDIRS=no .
435.
436.It Sy MKOBJDIRS
437.YorN
438Indicates whether object directories will be created automatically
439(via a
440.Dq make obj
441pass) at the start of a build.
442.DFLTn
443.
444.It Sy MKPAM
445.YorN
446Indicates whether the
447.Xr pam 8
448framework (libraries and support files) is built.
449The pre-PAM code is not supported and may be removed in the future.
450.DFLTy
451.
452.It Sy MKPF
453.YorN
454Indicates whether the
455.Xr pf 4
456programs, headers and LKM will be compiled and installed during a build.
457.DFLTy
458.
459.It Sy MKPIC
460.YorN
461Indicates whether shared objects and libraries will be created and
462installed during a build.
463If set to
464.Dq no ,
465the entire built system will be statically linked.
466.DFLT
467Platform dependent.
468As of this writing, all platforms except
469.Sy m68000
470and
471.Sy sh3
472default to
473.Dq yes .
474.Pp
475If
476.Dq no ,
477acts as
478.Sy MKPICLIB=no .
479.
480.It Sy MKPICINSTALL
481.YorN
482Indicates whether the
483.Xr ar 1
484format libraries
485.Sy ( lib*_pic.a ) ,
486used to generate shared libraries, are installed during a build.
487.DFLTy
488.
489.It Sy MKPICLIB
490.YorN
491Indicates whether the
492.Xr ar 1
493format libraries
494.Sy ( lib*_pic.a ) ,
495used to generate shared libraries.
496.DFLTy
497.
498.It Sy MKPOSTFIX
499.YorN
500Indicates whether Postfix is built.
501.DFLTy
502.
503.It Sy MKPROFILE
504.YorN
505Indicates whether profiled libraries
506.Sy ( lib*_p.a )
507will be built and installed during a build.
508.DFLT
509.Dq yes ;
510however, some platforms turn off
511.Sy MKPROFILE
512by default at times due to toolchain problems with profiled code.
513.
514.It Sy MKSHARE
515.YorN
516Indicates whether files destined to reside in
517.Sy DESTDIR Ns Pa /usr/share
518will be built and installed during a build.
519.DFLTy
520.Pp
521If
522.Dq no ,
523acts as
524.Sy MKCATPAGES=no MKDOC=no MKINFO=no MKHTML=no MKMAN=no MKNLS=no .
525.
526.It Sy MKSKEY
527.YorN
528Indicates whether the S/key infrastructure
529(libraries and support programs) is built.
530.DFLTy
531.
532.It Sy MKSOFTFLOAT
533.YorN
534Indicates whether the compiler generates output containing
535library calls for floating point and possibly soft-float library
536support.
537.DFLTn
538.
539.It Sy MKUNPRIVED
540.YorN
541Indicates whether an unprivileged install will occur.
542The user, group, permissions, and file flags, will not be set on
543the installed item; instead the information will be appended to
544a file called
545.Pa METALOG
546in
547.Sy DESTDIR .
548The contents of
549.Pa METALOG
550is used during the generation of the distribution tar files to ensure
551that the appropriate file ownership is stored.
552.DFLTn
553.
554.It Sy MKUPDATE
555.YorN
556Indicates whether all install operations intended to write to
557.Sy DESTDIR
558will compare file timestamps before installing, and skip the install
559phase if the destination files are up-to-date.
560This also has implications on full builds (see next subsection).
561.DFLTn
562.
563.It Sy MKYP
564.YorN
565Indicates whether the YP (NIS) infrastructure
566(libraries and support programs) is built.
567.DFLTy
568.
569.It Sy OBJMACHINE
570If defined, creates objdirs of the form
571.Pa obj. Ns Sy MACHINE ,
572where
573.Sy MACHINE
574is the current architecture (as per
575.Sq "uname -m" ) .
576.
577.It Sy RELEASEDIR
578If set, specifies the directory to which a
579.Xr release 7
580layout will be written at the end of a
581.Dq make release .
582.DFLTu
583.Pp
584.Em Note :
585.Sy build.sh
586will provide a default of
587.Pa releasedir
588(in the top-level
589.Sy .OBJDIR )
590unless run in
591.Sq expert
592mode
593.
594.It Sy TOOLDIR
595Directory to hold the host tools, once built.
596This directory should be unique to a given host system and
597.Nx
598source tree.
599(However, multiple targets may share the same
600.Sy TOOLDIR ;
601the target-dependent files have unique names.)
602If unset, a default based
603on the
604.Xr uname 1
605information of the host platform will be created in the
606.Sy .OBJDIR
607of
608.Pa src .
609.DFLTu
610.
611.It Sy USETOOLS
612Indicates whether the tools specified by
613.Sy TOOLDIR
614should be used as part of a build in progress.
615Must be set to
616.Dq yes
617if cross-compiling.
618.Bl -tag -width "never"
619.It Sy yes
620Use the tools from
621.Sy TOOLDIR .
622.It Sy no
623Do not use the tools from
624.Sy TOOLDIR ,
625but refuse to build native compilation tool components that are
626version-specific for that tool.
627.It Sy never
628Do not use the tools from
629.Sy TOOLDIR ,
630even when building native tool components.
631This is similar to the traditional
632.Nx
633build method, but does
634.Em not
635verify that the compilation tools in use are up-to-date enough in order
636to build the tree successfully.
637This may cause build or runtime problems when building the whole
638.Nx
639source tree.
640.El
641.DFLT
642.Dq yes
643if building all or part of a whole
644.Nx
645source tree (detected automatically);
646.Dq no
647otherwise (to preserve traditional semantics of the
648.Aq bsd.*.mk
649.Xr make 1
650include files).
651.
652.El
653.
654.Ss pkgsrc system variables
655.
656Please see the pkgsrc guide at
657.Pa http://www.netbsd.org/Documentation/pkgsrc/
658or
659.Pa pkgsrc/doc/pkgsrc.txt
660for more variables used internally by the package system and
661.Pa ${PKGSRCDIR}/mk/defaults/mk.conf
662for package-specific examples.
663.
664.Sh FILES
665.Bl -tag -width /etc/mk.conf
666.
667.It Pa /etc/mk.conf
668This file.
669.
670.It Pa ${PKGSRCDIR}/mk/defaults/mk.conf
671Examples for settings regarding the pkgsrc collection.
672.El
673.
674.Sh SEE ALSO
675.Xr make 1 ,
676.Pa /usr/share/mk/bsd.README ,
677.Pa pkgsrc/doc/pkgsrc.txt ,
678.Pa http://www.netbsd.org/Documentation/pkgsrc/
679.Sh HISTORY
680The
681.Nm
682file appeared in
683.Nx 1.2 .
684