]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/mk/bsd.own.mk
This commit was generated by cvs2svn to compensate for changes in r170764,
[FreeBSD/FreeBSD.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       KLD owner. [${BINOWN}]
48 #
49 # KMODGRP       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     MAN \
192     PROFILE
193 .if defined(NO_${var})
194 WITHOUT_${var}=
195 .endif
196 .endfor
197
198 #
199 # Compat NO_* options (same as above, except their use is deprecated).
200 #
201 .if !defined(BURN_BRIDGES)
202 .for var in \
203     ACPI \
204     ATM \
205     AUDIT \
206     AUTHPF \
207     BIND \
208     BIND_DNSSEC \
209     BIND_ETC \
210     BIND_LIBS_LWRES \
211     BIND_MTREE \
212     BIND_NAMED \
213     BIND_UTILS \
214     BLUETOOTH \
215     BOOT \
216     CALENDAR \
217     CPP \
218     CRYPT \
219     CVS \
220     CXX \
221     DICT \
222     DYNAMICROOT \
223     EXAMPLES \
224     FORTH \
225     FORTRAN \
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     ACPI \
289     ASSERT_DEBUG \
290     ATM \
291     AUDIT \
292     AUTHPF \
293     BIND \
294     BIND_DNSSEC \
295     BIND_ETC \
296     BIND_LIBS_LWRES \
297     BIND_MTREE \
298     BIND_NAMED \
299     BIND_UTILS \
300     BLUETOOTH \
301     BOOT \
302     BZIP2 \
303     CALENDAR \
304     CDDL \
305     CPP \
306     CRYPT \
307     CVS \
308     CXX \
309     DICT \
310     DYNAMICROOT \
311     EXAMPLES \
312     FORTH \
313     FORTRAN \
314     FP_LIBC \
315     GAMES \
316     GCOV \
317     GDB \
318     GNU \
319     GPIB \
320     GROFF \
321     HTML \
322     I4B \
323     INET6 \
324     INFO \
325     IPFILTER \
326     IPX \
327     KERBEROS \
328     KVM \
329     LIB32 \
330     LIBPTHREAD \
331     LIBTHR \
332     LOCALES \
333     LPR \
334     MAILWRAPPER \
335     MAN \
336     NCP \
337     NETCAT \
338     NIS \
339     NLS \
340     NLS_CATALOGS \
341     NS_CACHING \
342     OBJC \
343     OPENSSH \
344     OPENSSL \
345     PAM \
346     PF \
347     PROFILE \
348     RCMDS \
349     RCS \
350     RESCUE \
351     SENDMAIL \
352     SETUID_LOGIN \
353     SHAREDOCS \
354     SSP \
355     SYMVER \
356     SYSCONS \
357     TCSH \
358     TOOLCHAIN \
359     USB \
360     WPA_SUPPLICANT_EAPOL \
361     ZFS
362 .if defined(WITH_${var}) && defined(WITHOUT_${var})
363 .error WITH_${var} and WITHOUT_${var} can't both be set.
364 .endif
365 .if defined(MK_${var})
366 .error MK_${var} can't be set by a user.
367 .endif
368 .if defined(WITHOUT_${var})
369 MK_${var}:=     no
370 .else
371 MK_${var}:=     yes
372 .endif
373 .endfor
374
375 #
376 # MK_* options which default to "no".
377 #
378 .for var in \
379     BIND_LIBS \
380     HESIOD \
381     IDEA
382 .if defined(WITH_${var}) && defined(WITHOUT_${var})
383 .error WITH_${var} and WITHOUT_${var} can't both be set.
384 .endif
385 .if defined(MK_${var})
386 .error MK_${var} can't be set by a user.
387 .endif
388 .if defined(WITH_${var})
389 MK_${var}:=     yes
390 .else
391 MK_${var}:=     no
392 .endif
393 .endfor
394
395 #
396 # Force some options off if their dependencies are off.
397 #
398 .if ${MK_BIND} == "no"
399 MK_BIND_DNSSEC:= no
400 MK_BIND_ETC:=   no
401 MK_BIND_LIBS:=  no
402 MK_BIND_LIBS_LWRES:= no
403 MK_BIND_MTREE:= no
404 MK_BIND_NAMED:= no
405 MK_BIND_UTILS:= no
406 .endif
407
408 .if ${MK_BIND_MTREE} == "no"
409 MK_BIND_ETC:=   no
410 .endif
411
412 .if ${MK_CDDL} == "no"
413 MK_ZFS:=        no
414 .endif
415
416 .if ${MK_CRYPT} == "no"
417 MK_OPENSSL:=    no
418 MK_OPENSSH:=    no
419 MK_KERBEROS:=   no
420 .endif
421
422 .if ${MK_IPX} == "no"
423 MK_NCP:=        no
424 .endif
425
426 .if ${MK_OPENSSL} == "no"
427 MK_OPENSSH:=    no
428 MK_KERBEROS:=   no
429 .endif
430
431 .if ${MK_PF} == "no"
432 MK_AUTHPF:=     no
433 .endif
434
435 .if ${MK_TOOLCHAIN} == "no"
436 MK_GDB:=        no
437 .endif
438
439 #
440 # Set defaults for the MK_*_SUPPORT variables.
441 #
442
443 #
444 # MK_*_SUPPORT options which default to "yes" unless their corresponding
445 # MK_* variable is set to "no".
446 #
447 .for var in \
448     BZIP2 \
449     GNU \
450     INET6 \
451     IPX \
452     KERBEROS \
453     KVM \
454     PAM
455 .if defined(WITH_${var}_SUPPORT) && defined(WITHOUT_${var}_SUPPORT)
456 .error WITH_${var}_SUPPORT and WITHOUT_${var}_SUPPORT can't both be set.
457 .endif
458 .if defined(MK_${var}_SUPPORT)
459 .error MK_${var}_SUPPORT can't be set by a user.
460 .endif
461 .if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no"
462 MK_${var}_SUPPORT:= no
463 .else
464 MK_${var}_SUPPORT:= yes
465 .endif
466 .endfor
467 .endif # !_WITHOUT_SRCCONF
468
469 .endif  # !target(__<bsd.own.mk>__)