]> CyberLeo.Net >> Repos - FreeBSD/releng/7.2.git/blob - share/mk/bsd.own.mk
Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.
[FreeBSD/releng/7.2.git] / share / mk / bsd.own.mk
1 # $FreeBSD$
2 #
3 # The include file <bsd.own.mk> set common variables for owner,
4 # group, mode, and directories. Defaults are in brackets.
5 #
6 #
7 # +++ variables +++
8 #
9 # DESTDIR       Change the tree where the file gets installed. [not set]
10 #
11 # DISTDIR       Change the tree where the file for a distribution
12 #               gets installed (see /usr/src/release/Makefile). [not set]
13 #
14 # COMPRESS_CMD  Program to compress documents.
15 #               Output is to stdout. [gzip -cn]
16 #
17 # COMPRESS_EXT  File name extension of ${COMPRESS_CMD} command. [.gz]
18 #
19 # BINOWN        Binary owner. [root]
20 #
21 # BINGRP        Binary group. [wheel]
22 #
23 # BINMODE       Binary mode. [555]
24 #
25 # NOBINMODE     Mode for non-executable files. [444]
26 #
27 # LIBDIR        Base path for libraries. [/usr/lib]
28 #
29 # LIBCOMPATDIR  Base path for compat libraries. [/usr/lib/compat]
30 #
31 # LIBDATADIR    Base path for misc. utility data files. [/usr/libdata]
32 #
33 # LINTLIBDIR    Base path for lint libraries. [/usr/libdata/lint]
34 #
35 # SHLIBDIR      Base path for shared libraries. [${LIBDIR}]
36 #
37 # LIBOWN        Library owner. [${BINOWN}]
38 #
39 # LIBGRP        Library group. [${BINGRP}]
40 #
41 # LIBMODE       Library mode. [${NOBINMODE}]
42 #
43 #
44 # KMODDIR       Base path for loadable kernel modules
45 #               (see kld(4)). [/boot/kernel]
46 #
47 # KMODOWN       Kernel and KLD owner. [${BINOWN}]
48 #
49 # KMODGRP       Kernel and KLD group. [${BINGRP}]
50 #
51 # KMODMODE      KLD mode. [${BINMODE}]
52 #
53 #
54 # SHAREDIR      Base path for architecture-independent ascii
55 #               text files. [/usr/share]
56 #
57 # SHAREOWN      ASCII text file owner. [root]
58 #
59 # SHAREGRP      ASCII text file group. [wheel]
60 #
61 # SHAREMODE     ASCII text file mode. [${NOBINMODE}]
62 #
63 #
64 # DOCDIR        Base path for system documentation (e.g. PSD, USD,
65 #               handbook, FAQ etc.). [${SHAREDIR}/doc]
66 #
67 # DOCOWN        Documentation owner. [${SHAREOWN}]
68 #
69 # DOCGRP        Documentation group. [${SHAREGRP}]
70 #
71 # DOCMODE       Documentation mode. [${NOBINMODE}]
72 #
73 #
74 # INFODIR       Base path for GNU's hypertext system
75 #               called Info (see info(1)). [${SHAREDIR}/info]
76 #
77 # INFOOWN       Info owner. [${SHAREOWN}]
78 #
79 # INFOGRP       Info group. [${SHAREGRP}]
80 #
81 # INFOMODE      Info mode. [${NOBINMODE}]
82 #
83 #
84 # MANDIR        Base path for manual installation. [${SHAREDIR}/man/man]
85 #
86 # MANOWN        Manual owner. [${SHAREOWN}]
87 #
88 # MANGRP        Manual group. [${SHAREGRP}]
89 #
90 # MANMODE       Manual mode. [${NOBINMODE}]
91 #
92 #
93 # NLSDIR        Base path for National Language Support files
94 #               installation. [${SHAREDIR}/nls]
95 #
96 # NLSOWN        National Language Support files owner. [${SHAREOWN}]
97 #
98 # NLSGRP        National Language Support files group. [${SHAREGRP}]
99 #
100 # NLSMODE       National Language Support files mode. [${NOBINMODE}]
101 #
102 # INCLUDEDIR    Base path for standard C include files [/usr/include]
103
104 .if !target(__<bsd.own.mk>__)
105 __<bsd.own.mk>__:
106
107 .if !defined(_WITHOUT_SRCCONF)
108 SRCCONF?=       /etc/src.conf
109 .if exists(${SRCCONF})
110 .include "${SRCCONF}"
111 .endif
112 .endif
113
114 # Binaries
115 BINOWN?=        root
116 BINGRP?=        wheel
117 BINMODE?=       555
118 NOBINMODE?=     444
119
120 .if defined(MODULES_WITH_WORLD)
121 KMODDIR?=       /boot/modules
122 .else
123 KMODDIR?=       /boot/kernel
124 .endif
125 KMODOWN?=       ${BINOWN}
126 KMODGRP?=       ${BINGRP}
127 KMODMODE?=      ${BINMODE}
128
129 LIBDIR?=        /usr/lib
130 LIBCOMPATDIR?=  /usr/lib/compat
131 LIBDATADIR?=    /usr/libdata
132 LINTLIBDIR?=    /usr/libdata/lint
133 SHLIBDIR?=      ${LIBDIR}
134 LIBOWN?=        ${BINOWN}
135 LIBGRP?=        ${BINGRP}
136 LIBMODE?=       ${NOBINMODE}
137
138
139 # Share files
140 SHAREDIR?=      /usr/share
141 SHAREOWN?=      root
142 SHAREGRP?=      wheel
143 SHAREMODE?=     ${NOBINMODE}
144
145 MANDIR?=        ${SHAREDIR}/man/man
146 MANOWN?=        ${SHAREOWN}
147 MANGRP?=        ${SHAREGRP}
148 MANMODE?=       ${NOBINMODE}
149
150 DOCDIR?=        ${SHAREDIR}/doc
151 DOCOWN?=        ${SHAREOWN}
152 DOCGRP?=        ${SHAREGRP}
153 DOCMODE?=       ${NOBINMODE}
154
155 INFODIR?=       ${SHAREDIR}/info
156 INFOOWN?=       ${SHAREOWN}
157 INFOGRP?=       ${SHAREGRP}
158 INFOMODE?=      ${NOBINMODE}
159
160 NLSDIR?=        ${SHAREDIR}/nls
161 NLSOWN?=        ${SHAREOWN}
162 NLSGRP?=        ${SHAREGRP}
163 NLSMODE?=       ${NOBINMODE}
164
165 DEFAULT_THREAD_LIB?=    libthr
166
167 INCLUDEDIR?=    /usr/include
168
169 # Common variables
170 .if !defined(DEBUG_FLAGS)
171 STRIP?=         -s
172 .endif
173
174 COMPRESS_CMD?=  gzip -cn
175 COMPRESS_EXT?=  .gz
176
177 .if !defined(_WITHOUT_SRCCONF)
178 #
179 # Define MK_* variables (which are either "yes" or "no") for users
180 # to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the
181 # make(1) environment.
182 # These should be tested with `== "no"' or `!= "no"' in makefiles.
183 # The NO_* variables should only be set by makefiles.
184 #
185
186 #
187 # Supported NO_* options (if defined, MK_* will be forced to "no",
188 # regardless of user's setting).
189 #
190 .for var in \
191     INSTALLLIB \
192     MAN \
193     PROFILE
194 .if defined(NO_${var})
195 WITHOUT_${var}=
196 .endif
197 .endfor
198
199 #
200 # Compat NO_* options (same as above, except their use is deprecated).
201 #
202 .if !defined(BURN_BRIDGES)
203 .for var in \
204     ACPI \
205     ATM \
206     AUDIT \
207     AUTHPF \
208     BIND \
209     BIND_DNSSEC \
210     BIND_ETC \
211     BIND_LIBS_LWRES \
212     BIND_MTREE \
213     BIND_NAMED \
214     BIND_UTILS \
215     BLUETOOTH \
216     BOOT \
217     CALENDAR \
218     CPP \
219     CRYPT \
220     CVS \
221     CXX \
222     DICT \
223     DYNAMICROOT \
224     EXAMPLES \
225     FORTH \
226     FP_LIBC \
227     GAMES \
228     GCOV \
229     GDB \
230     GNU \
231     GPIB \
232     GROFF \
233     HTML \
234     I4B \
235     INET6 \
236     INFO \
237     IPFILTER \
238     IPX \
239     KERBEROS \
240     LIB32 \
241     LIBPTHREAD \
242     LIBTHR \
243     LOCALES \
244     LPR \
245     MAILWRAPPER \
246     NETCAT \
247     NIS \
248     NLS \
249     NLS_CATALOGS \
250     NS_CACHING \
251     OBJC \
252     OPENSSH \
253     OPENSSL \
254     PAM \
255     PF \
256     RCMDS \
257     RCS \
258     RESCUE \
259     SENDMAIL \
260     SETUID_LOGIN \
261     SHAREDOCS \
262     SYSCONS \
263     TCSH \
264     TOOLCHAIN \
265     USB \
266     WPA_SUPPLICANT_EAPOL
267 .if defined(NO_${var})
268 #.warning NO_${var} is deprecated in favour of WITHOUT_${var}=
269 WITHOUT_${var}=
270 .endif
271 .endfor
272 .endif # !defined(BURN_BRIDGES)
273
274 #
275 # Older-style variables that enabled behaviour when set.
276 #
277 .if defined(YES_HESIOD)
278 WITH_HESIOD=
279 .endif
280 .if defined(MAKE_IDEA)
281 WITH_IDEA=
282 .endif
283
284 #
285 # MK_* options which default to "yes".
286 #
287 .for var in \
288     ACCT \
289     ACPI \
290     AMD \
291     APM \
292     ASSERT_DEBUG \
293     AT \
294     ATM \
295     AUDIT \
296     AUTHPF \
297     BIND \
298     BIND_DNSSEC \
299     BIND_ETC \
300     BIND_LIBS_LWRES \
301     BIND_MTREE \
302     BIND_NAMED \
303     BIND_UTILS \
304     BLUETOOTH \
305     BOOT \
306     BSNMP \
307     BZIP2 \
308     CALENDAR \
309     CDDL \
310     CPP \
311     CRYPT \
312     CTM \
313     CVS \
314     CXX \
315     DICT \
316     DYNAMICROOT \
317     EXAMPLES \
318     FLOPPY \
319     FORTH \
320     FP_LIBC \
321     FREEBSD_UPDATE \
322     GAMES \
323     GCOV \
324     GDB \
325     GNU \
326     GPIB \
327     GROFF \
328     HTML \
329     I4B \
330     INET6 \
331     INFO \
332     INSTALLLIB \
333     IPFILTER \
334     IPFW \
335     IPX \
336     JAIL \
337     KERBEROS \
338     KVM \
339     LEGACY_CONSOLE \
340     LIB32 \
341     LIBPTHREAD \
342     LIBKSE \
343     LIBTHR \
344     LOCALES \
345     LOCATE \
346     LPR \
347     MAIL \
348     MAILWRAPPER \
349     MAKE \
350     MAN \
351     NCP \
352     NDIS \
353     NETCAT \
354     NETGRAPH \
355     NIS \
356     NLS \
357     NLS_CATALOGS \
358     NS_CACHING \
359     NTP \
360     OBJC \
361     OPENSSH \
362     OPENSSL \
363     PAM \
364     PF \
365     PKGTOOLS \
366     PMC \
367     PORTSNAP \
368     PPP \
369     PROFILE \
370     QUOTAS \
371     RCMDS \
372     RCS \
373     RESCUE \
374     ROUTED \
375     SENDMAIL \
376     SETUID_LOGIN \
377     SHAREDOCS \
378     SLIP \
379     SSP \
380     SYSINSTALL \
381     SYMVER \
382     SYSCONS \
383     TCSH \
384     TELNET \
385     TEXTPROC \
386     TOOLCHAIN \
387     USB \
388     WIRELESS \
389     WPA_SUPPLICANT_EAPOL \
390     ZONEINFO \
391     ZFS
392 .if defined(WITH_${var}) && defined(WITHOUT_${var})
393 .error WITH_${var} and WITHOUT_${var} can't both be set.
394 .endif
395 .if defined(MK_${var})
396 .error MK_${var} can't be set by a user.
397 .endif
398 .if defined(WITHOUT_${var})
399 MK_${var}:=     no
400 .else
401 MK_${var}:=     yes
402 .endif
403 .endfor
404
405 #
406 # MK_* options which default to "no".
407 #
408 .for var in \
409     BIND_LIBS \
410     HESIOD \
411     IDEA
412 .if defined(WITH_${var}) && defined(WITHOUT_${var})
413 .error WITH_${var} and WITHOUT_${var} can't both be set.
414 .endif
415 .if defined(MK_${var})
416 .error MK_${var} can't be set by a user.
417 .endif
418 .if defined(WITH_${var})
419 MK_${var}:=     yes
420 .else
421 MK_${var}:=     no
422 .endif
423 .endfor
424
425 #
426 # Force some options off if their dependencies are off.
427 # Order is somewhat important.
428 #
429 .if ${MK_LIBPTHREAD} == "no"
430 MK_LIBKSE:=     no
431 MK_LIBTHR:=     no
432 .endif
433
434 .if ${MK_LIBKSE} == "no" && ${MK_LIBTHR} == "no"
435 MK_BIND:=       no
436 .endif
437
438 .if ${MK_BIND} == "no"
439 MK_BIND_DNSSEC:= no
440 MK_BIND_ETC:=   no
441 MK_BIND_LIBS:=  no
442 MK_BIND_LIBS_LWRES:= no
443 MK_BIND_MTREE:= no
444 MK_BIND_NAMED:= no
445 MK_BIND_UTILS:= no
446 .endif
447
448 .if ${MK_BIND_MTREE} == "no"
449 MK_BIND_ETC:=   no
450 .endif
451
452 .if ${MK_CDDL} == "no"
453 MK_ZFS:=        no
454 .endif
455
456 .if ${MK_CRYPT} == "no"
457 MK_OPENSSL:=    no
458 MK_OPENSSH:=    no
459 MK_KERBEROS:=   no
460 .endif
461
462 .if ${MK_IPX} == "no"
463 MK_NCP:=        no
464 .endif
465
466 .if ${MK_MAIL} == "no"
467 MK_MAILWRAPPER:= no
468 MK_SENDMAIL:=   no
469 .endif
470
471 .if ${MK_OPENSSL} == "no"
472 MK_OPENSSH:=    no
473 MK_KERBEROS:=   no
474 .endif
475
476 .if ${MK_PF} == "no"
477 MK_AUTHPF:=     no
478 .endif
479
480 .if ${MK_TEXTPROC} == "no"
481 MK_GROFF:=      no
482 .endif
483
484 .if ${MK_TOOLCHAIN} == "no"
485 MK_GDB:=        no
486 .endif
487
488 #
489 # Set defaults for the MK_*_SUPPORT variables.
490 #
491
492 #
493 # MK_*_SUPPORT options which default to "yes" unless their corresponding
494 # MK_* variable is set to "no".
495 #
496 .for var in \
497     BZIP2 \
498     GNU \
499     INET6 \
500     IPX \
501     KERBEROS \
502     KVM \
503     NETGRAPH \
504     PAM \
505     WIRELESS
506 .if defined(WITH_${var}_SUPPORT) && defined(WITHOUT_${var}_SUPPORT)
507 .error WITH_${var}_SUPPORT and WITHOUT_${var}_SUPPORT can't both be set.
508 .endif
509 .if defined(MK_${var}_SUPPORT)
510 .error MK_${var}_SUPPORT can't be set by a user.
511 .endif
512 .if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no"
513 MK_${var}_SUPPORT:= no
514 .else
515 MK_${var}_SUPPORT:= yes
516 .endif
517 .endfor
518
519 #
520 # MK_* options whose default value depends on another option.
521 #
522 .for vv in \
523     GSSAPI/KERBEROS
524 .if defined(WITH_${vv:H}) && defined(WITHOUT_${vv:H})
525 .error WITH_${vv:H} and WITHOUT_${vv:H} can't both be set.
526 .endif
527 .if defined(MK_${vv:H})
528 .error MK_${vv:H} can't be set by a user.
529 .endif
530 .if defined(WITH_${vv:H})
531 MK_${vv:H}:=    yes
532 .elif defined(WITHOUT_${vv:H})
533 MK_${vv:H}:=    no
534 .else
535 MK_${vv:H}:=    ${MK_${vv:T}}
536 .endif
537 .endfor
538
539 .endif # !_WITHOUT_SRCCONF
540
541 .endif  # !target(__<bsd.own.mk>__)