]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/mk/bsd.own.mk
This commit was generated by cvs2svn to compensate for changes in r167817,
[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 INCLUDEDIR?=    /usr/include
166
167 # Common variables
168 .if !defined(DEBUG_FLAGS)
169 STRIP?=         -s
170 .endif
171
172 COMPRESS_CMD?=  gzip -cn
173 COMPRESS_EXT?=  .gz
174
175 .if !defined(_WITHOUT_SRCCONF)
176 #
177 # Define MK_* variables (which are either "yes" or "no") for users
178 # to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the
179 # make(1) environment.
180 # These should be tested with `== "no"' or `!= "no"' in makefiles.
181 # The NO_* variables should only be set by makefiles.
182 #
183
184 #
185 # Supported NO_* options (if defined, MK_* will be forced to "no",
186 # regardless of user's setting).
187 #
188 .for var in \
189     MAN \
190     PROFILE
191 .if defined(NO_${var})
192 WITHOUT_${var}=
193 .endif
194 .endfor
195
196 #
197 # Compat NO_* options (same as above, except their use is deprecated).
198 #
199 .if !defined(BURN_BRIDGES)
200 .for var in \
201     ACPI \
202     ATM \
203     AUDIT \
204     AUTHPF \
205     BIND \
206     BIND_DNSSEC \
207     BIND_ETC \
208     BIND_LIBS_LWRES \
209     BIND_MTREE \
210     BIND_NAMED \
211     BIND_UTILS \
212     BLUETOOTH \
213     BOOT \
214     CALENDAR \
215     CPP \
216     CRYPT \
217     CVS \
218     CXX \
219     DICT \
220     DYNAMICROOT \
221     EXAMPLES \
222     FORTH \
223     FORTRAN \
224     FP_LIBC \
225     GAMES \
226     GCOV \
227     GDB \
228     GNU \
229     GPIB \
230     GROFF \
231     HTML \
232     I4B \
233     INET6 \
234     INFO \
235     IPFILTER \
236     IPX \
237     KERBEROS \
238     LIB32 \
239     LIBPTHREAD \
240     LIBTHR \
241     LOCALES \
242     LPR \
243     MAILWRAPPER \
244     NETCAT \
245     NIS \
246     NLS \
247     NLS_CATALOGS \
248     NS_CACHING \
249     OBJC \
250     OPENSSH \
251     OPENSSL \
252     PAM \
253     PF \
254     RCMDS \
255     RCS \
256     RESCUE \
257     SENDMAIL \
258     SETUID_LOGIN \
259     SHAREDOCS \
260     SYSCONS \
261     TCSH \
262     TOOLCHAIN \
263     USB \
264     WPA_SUPPLICANT_EAPOL
265 .if defined(NO_${var})
266 #.warning NO_${var} is deprecated in favour of WITHOUT_${var}=
267 WITHOUT_${var}=
268 .endif
269 .endfor
270 .endif # !defined(BURN_BRIDGES)
271
272 #
273 # Older-style variables that enabled behaviour when set.
274 #
275 .if defined(YES_HESIOD)
276 WITH_HESIOD=
277 .endif
278 .if defined(MAKE_IDEA)
279 WITH_IDEA=
280 .endif
281
282 #
283 # MK_* options which default to "yes".
284 #
285 .for var in \
286     ACPI \
287     ASSERT_DEBUG \
288     ATM \
289     AUDIT \
290     AUTHPF \
291     BIND \
292     BIND_DNSSEC \
293     BIND_ETC \
294     BIND_LIBS_LWRES \
295     BIND_MTREE \
296     BIND_NAMED \
297     BIND_UTILS \
298     BLUETOOTH \
299     BOOT \
300     BZIP2 \
301     CALENDAR \
302     CDDL \
303     CPP \
304     CRYPT \
305     CVS \
306     CXX \
307     DICT \
308     DYNAMICROOT \
309     EXAMPLES \
310     FORTH \
311     FORTRAN \
312     FP_LIBC \
313     GAMES \
314     GCOV \
315     GDB \
316     GNU \
317     GPIB \
318     GROFF \
319     HTML \
320     I4B \
321     INET6 \
322     INFO \
323     IPFILTER \
324     IPX \
325     KERBEROS \
326     LIB32 \
327     LIBPTHREAD \
328     LIBTHR \
329     LOCALES \
330     LPR \
331     MAILWRAPPER \
332     MAN \
333     NCP \
334     NETCAT \
335     NIS \
336     NLS \
337     NLS_CATALOGS \
338     NS_CACHING \
339     OBJC \
340     OPENSSH \
341     OPENSSL \
342     PAM \
343     PF \
344     PROFILE \
345     RCMDS \
346     RCS \
347     RESCUE \
348     SENDMAIL \
349     SETUID_LOGIN \
350     SHAREDOCS \
351     SYSCONS \
352     TCSH \
353     TOOLCHAIN \
354     USB \
355     WPA_SUPPLICANT_EAPOL
356 .if defined(WITH_${var}) && defined(WITHOUT_${var})
357 .error WITH_${var} and WITHOUT_${var} can't both be set.
358 .endif
359 .if defined(MK_${var})
360 .error MK_${var} can't be set by a user.
361 .endif
362 .if defined(WITHOUT_${var})
363 MK_${var}:=     no
364 .else
365 MK_${var}:=     yes
366 .endif
367 .endfor
368
369 #
370 # MK_* options which default to "no".
371 #
372 .for var in \
373     BIND_LIBS \
374     HESIOD \
375     IDEA
376 .if defined(WITH_${var}) && defined(WITHOUT_${var})
377 .error WITH_${var} and WITHOUT_${var} can't both be set.
378 .endif
379 .if defined(MK_${var})
380 .error MK_${var} can't be set by a user.
381 .endif
382 .if defined(WITH_${var})
383 MK_${var}:=     yes
384 .else
385 MK_${var}:=     no
386 .endif
387 .endfor
388
389 #
390 # Force some options off if their dependencies are off.
391 #
392 .if ${MK_BIND} == "no"
393 MK_BIND_DNSSEC:= no
394 MK_BIND_ETC:=   no
395 MK_BIND_LIBS:=  no
396 MK_BIND_LIBS_LWRES:= no
397 MK_BIND_MTREE:= no
398 MK_BIND_NAMED:= no
399 MK_BIND_UTILS:= no
400 .endif
401
402 .if ${MK_BIND_MTREE} == "no"
403 MK_BIND_ETC:=   no
404 .endif
405
406 .if ${MK_CRYPT} == "no"
407 MK_OPENSSL:=    no
408 MK_OPENSSH:=    no
409 MK_KERBEROS:=   no
410 .endif
411
412 .if ${MK_IPX} == "no"
413 MK_NCP:=        no
414 .endif
415
416 .if ${MK_OPENSSL} == "no"
417 MK_OPENSSH:=    no
418 MK_KERBEROS:=   no
419 .endif
420
421 .if ${MK_PF} == "no"
422 MK_AUTHPF:=     no
423 .endif
424
425 .if ${MK_TOOLCHAIN} == "no"
426 MK_GDB:=        no
427 .endif
428
429 #
430 # Set defaults for the MK_*_SUPPORT variables.
431 #
432
433 #
434 # MK_*_SUPPORT options which default to "yes" unless their corresponding
435 # MK_* variable is set to "no".
436 #
437 .for var in \
438     BZIP2 \
439     GNU \
440     INET6 \
441     IPX \
442     KERBEROS \
443     PAM
444 .if defined(WITH_${var}_SUPPORT) && defined(WITHOUT_${var}_SUPPORT)
445 .error WITH_${var}_SUPPORT and WITHOUT_${var}_SUPPORT can't both be set.
446 .endif
447 .if defined(MK_${var}_SUPPORT)
448 .error MK_${var}_SUPPORT can't be set by a user.
449 .endif
450 .if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no"
451 MK_${var}_SUPPORT:= no
452 .else
453 MK_${var}_SUPPORT:= yes
454 .endif
455 .endfor
456 .endif # !_WITHOUT_SRCCONF
457
458 .endif  # !target(__<bsd.own.mk>__)